Don't kill the authentication cookie the first time we use it.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 10 Aug 2008 19:33:59 +0000 (21:33 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 10 Aug 2008 19:33:59 +0000 (21:33 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/xorgsession.php

index 48a2664..229df76 100644 (file)
@@ -222,7 +222,8 @@ class XorgSession extends PlSession
         } else {
             $logger = S::logger($uid);
             setcookie('ORGuid', $uid, (time() + 25920000), '/', '', 0);
-            if (Post::v('remember', 'false') == 'true') {
+
+            if (S::i('auth_by_cookie') == S::i('uid') || Post::v('remember', 'false') == 'true') {
                 $cookie = hash_encrypt($sess['password']);
                 setcookie('ORGaccess', $cookie, (time() + 25920000), '/', '', 0);
                 if ($logger) {