]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Bug corrected: cookie not deleted when logout
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 9 Jan 2008 17:50:01 +0000 (17:50 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Wed, 9 Jan 2008 17:50:01 +0000 (17:50 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@4 b3834d28-1941-0410-a4f8-b48e95affb8f

services/userservice.php

index b5853889dba8a916cca061918dcffae53897888b..4a7cd4f1fd06afcbea84e96fe44b1eab22ddb430 100644 (file)
@@ -158,7 +158,7 @@ class UserService {
             $id = $_SESSION[$this->getSessionKey()] = $row[$this->getFieldName('primary')];
             if ($remember) {
                 $cookie = $id .':'. md5($username.$password);
-                setcookie($this->cookiekey, $cookie, time() + $this->cookietime);
+                setcookie($this->cookiekey, $cookie, time() + $this->cookietime, '/');
             }
             return true;
         } else {
@@ -167,8 +167,8 @@ class UserService {
     }
 
     function logout() {
-        @setcookie($this->cookiekey, NULL, time() - 1);
-        unset($_COOKIE[$this->cookiekey]);
+        @setcookie($this->getCookiekey(), '', time() - 1, '/');
+        unset($_COOKIE[$this->getCookiekey()]);
         session_unset();
         $this->getCurrentUser(TRUE, false);
     }