Bug corrected: cookie not deleted when logout
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@4 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
ef9143907f
commit
980d240e62
1 changed files with 3 additions and 3 deletions
|
@ -158,7 +158,7 @@ class UserService {
|
||||||
$id = $_SESSION[$this->getSessionKey()] = $row[$this->getFieldName('primary')];
|
$id = $_SESSION[$this->getSessionKey()] = $row[$this->getFieldName('primary')];
|
||||||
if ($remember) {
|
if ($remember) {
|
||||||
$cookie = $id .':'. md5($username.$password);
|
$cookie = $id .':'. md5($username.$password);
|
||||||
setcookie($this->cookiekey, $cookie, time() + $this->cookietime);
|
setcookie($this->cookiekey, $cookie, time() + $this->cookietime, '/');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -167,8 +167,8 @@ class UserService {
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
@setcookie($this->cookiekey, NULL, time() - 1);
|
@setcookie($this->getCookiekey(), '', time() - 1, '/');
|
||||||
unset($_COOKIE[$this->cookiekey]);
|
unset($_COOKIE[$this->getCookiekey()]);
|
||||||
session_unset();
|
session_unset();
|
||||||
$this->getCurrentUser(TRUE, false);
|
$this->getCurrentUser(TRUE, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue