From fb3ade421aad7874370f7d718766ee32d71afb34 Mon Sep 17 00:00:00 2001 From: Graham Cole <chckens@sucs.org> Date: Fri, 13 Jun 2008 12:50:55 +0000 Subject: [PATCH] hopefully stop the site getting confused about where it's logged in and where it isn't :-) --- lib/session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session.php b/lib/session.php index 135d299..5575843 100644 --- a/lib/session.php +++ b/lib/session.php @@ -41,7 +41,7 @@ private $datahash=''; // hash of data field $token = $this->genSessionID(); $DB->Execute("insert into {$this->table} (hash, lastseen, ip) values (?,NOW(),?)", array($token, $_SERVER['REMOTE_ADDR'])); setcookie("sucssite_session", $token, NULL, "/", $preferred_hostname); - setcookie("sucssite_loggedin", "false"); + setcookie("sucssite_loggedin", "false", time()); $this->token = $token; return; } @@ -319,7 +319,7 @@ private $datahash=''; // hash of data field // set a cookie as a hint that we're logged in // this can be checked for to allow redirecting to SSL to get the secure cookie - setcookie("sucssite_loggedin", "true", time() + $this->max_session_length * 60); + setcookie("sucssite_loggedin", "true", time() + $this->max_session_length * 60, "/"); // Update the session, filling in the blanks $DB->Execute("update {$this->table} set hash=?, username=?, logintime='NOW()', lastseen='NOW()', ip=? where hash=?", -- GitLab