diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-01 02:09:01 +0400 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-11-01 02:09:01 +0400 |
commit | 5b5fb3976e903376181ca990e5173d79d44d1907 (patch) | |
tree | 239734250153ccc29b9f22e87dd1805bf2200215 /lib | |
parent | fb7cff5be5efb8241dca1aac69a6429ea9031dab (diff) | |
parent | e6625cccb9571b5fef84249f22eeebd4388fcf08 (diff) |
Merge pull request #5583 from frisco82/backportCookieChanges
Backport of #3985 (Invalid remember me token)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/user.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/user.php b/lib/user.php index 55ffc26e77f..6cb9c22874b 100644 --- a/lib/user.php +++ b/lib/user.php @@ -645,12 +645,12 @@ class OC_User { /** * @brief Remove cookie for "remember username" */ - public static function unsetMagicInCookie() { - unset($_COOKIE["oc_username"]); + public function unsetMagicInCookie() { + unset($_COOKIE["oc_username"]); //TODO: DI unset($_COOKIE["oc_token"]); unset($_COOKIE["oc_remember_login"]); - setcookie("oc_username", null, -1); - setcookie("oc_token", null, -1); - setcookie("oc_remember_login", null, -1); + setcookie('oc_username', '', time()-3600, \OC::$WEBROOT); + setcookie('oc_token', '', time()-3600, \OC::$WEBROOT); + setcookie('oc_remember_login', '', time()-3600, \OC::$WEBROOT); } } |