From: Florent Bruneau Date: Sun, 10 Aug 2008 19:33:59 +0000 (+0200) Subject: Don't kill the authentication cookie the first time we use it. X-Git-Tag: xorg/0.10.0~139 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a90cde48af2bc5bcdd2fb6d53704a8cf9931f52f;p=platal.git Don't kill the authentication cookie the first time we use it. Signed-off-by: Florent Bruneau --- diff --git a/classes/xorgsession.php b/classes/xorgsession.php index 48a2664..229df76 100644 --- a/classes/xorgsession.php +++ b/classes/xorgsession.php @@ -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) {