Skip to content
Snippets Groups Projects
Commit ce443818 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Check if oc_token cookie exists before trying to use it

parent 34e5cb50
Branches
No related tags found
No related merge requests found
......@@ -557,7 +557,9 @@ class OC
OC_App::loadApps();
OC_User::setupBackends();
if (isset($_GET["logout"]) and ($_GET["logout"])) {
if (isset($_COOKIE['oc_token'])) {
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
}
OC_User::logout();
header("Location: " . OC::$WEBROOT . '/');
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment