Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-11-05 18:00:28 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2013-11-05 18:00:28 +0400
commit13c75259b7d6bbc90eba6cf9956f730f71e7d975 (patch)
tree3002071980a6955b33a6f3a14ca1d25dee880a0b /lib
parent38d945f300fd0a563208be379b15c570c03062e8 (diff)
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.php8
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"]);