diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-02 19:59:04 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-02 19:59:04 -0500 |
commit | ce443818d4a54c2f1d2d058c5cf2347e470d0d46 (patch) | |
tree | 7d1c804dcbf26fc8783ad3176f1595d59025af92 /lib/base.php | |
parent | 34e5cb5070a36f2462cf53b7c64c68931dd68d45 (diff) | |
download | nextcloud-server-ce443818d4a54c2f1d2d058c5cf2347e470d0d46.tar.gz nextcloud-server-ce443818d4a54c2f1d2d058c5cf2347e470d0d46.zip |
Check if oc_token cookie exists before trying to use it
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 94fb7979620..ef203b33c2b 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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 { |