diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-05 15:00:28 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-05 15:00:28 +0100 |
commit | 13c75259b7d6bbc90eba6cf9956f730f71e7d975 (patch) | |
tree | 3002071980a6955b33a6f3a14ca1d25dee880a0b /lib | |
parent | 38d945f300fd0a563208be379b15c570c03062e8 (diff) | |
download | nextcloud-server-13c75259b7d6bbc90eba6cf9956f730f71e7d975.tar.gz nextcloud-server-13c75259b7d6bbc90eba6cf9956f730f71e7d975.zip |
we create the cookies for the url path \OC::$WEBROOT - as a result we shall 'remove' them with the same path
unsetMagicInCookie() is supposed to be static
Diffstat (limited to 'lib')
-rw-r--r-- | lib/user.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/user.php b/lib/user.php index 6cb9c22874b..31be3f20db8 100644 --- a/lib/user.php +++ b/lib/user.php @@ -637,15 +637,15 @@ class OC_User { public static function setMagicInCookie($username, $token) { $secure_cookie = OC_Config::getValue("forcessl", false); $expires = time() + OC_Config::getValue('remember_login_cookie_lifetime', 60*60*24*15); - setcookie("oc_username", $username, $expires, '', '', $secure_cookie); - setcookie("oc_token", $token, $expires, '', '', $secure_cookie, true); - setcookie("oc_remember_login", true, $expires, '', '', $secure_cookie); + setcookie("oc_username", $username, $expires, \OC::$WEBROOT, '', $secure_cookie); + setcookie("oc_token", $token, $expires, \OC::$WEBROOT, '', $secure_cookie, true); + setcookie("oc_remember_login", true, $expires, \OC::$WEBROOT, '', $secure_cookie); } /** * @brief Remove cookie for "remember username" */ - public function unsetMagicInCookie() { + public static function unsetMagicInCookie() { unset($_COOKIE["oc_username"]); //TODO: DI unset($_COOKIE["oc_token"]); unset($_COOKIE["oc_remember_login"]); |