Skip to content
Snippets Groups Projects
Commit fb3ade42 authored by Graham Cole's avatar Graham Cole
Browse files

hopefully stop the site getting confused about where it's logged in and where it isn't :-)

parent 59b2fb69
No related branches found
No related tags found
No related merge requests found
......@@ -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=?",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment