Check if oc_token cookie exists before trying to use it

This commit is contained in:
Michael Gapczynski 2013-01-02 19:59:04 -05:00
parent 34e5cb5070
commit ce443818d4
1 changed files with 3 additions and 1 deletions

View File

@ -557,7 +557,9 @@ class OC
OC_App::loadApps();
OC_User::setupBackends();
if (isset($_GET["logout"]) and ($_GET["logout"])) {
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
if (isset($_COOKIE['oc_token'])) {
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
}
OC_User::logout();
header("Location: " . OC::$WEBROOT . '/');
} else {