Merge pull request #1067 from owncloud/fix-logout
Check if oc_token cookie exists during logout
This commit is contained in:
commit
4e1923b01e
|
@ -557,7 +557,9 @@ class OC
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
OC_User::setupBackends();
|
OC_User::setupBackends();
|
||||||
if (isset($_GET["logout"]) and ($_GET["logout"])) {
|
if (isset($_GET["logout"]) and ($_GET["logout"])) {
|
||||||
|
if (isset($_COOKIE['oc_token'])) {
|
||||||
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
|
OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
|
||||||
|
}
|
||||||
OC_User::logout();
|
OC_User::logout();
|
||||||
header("Location: " . OC::$WEBROOT . '/');
|
header("Location: " . OC::$WEBROOT . '/');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue