mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
minor updates to add domain, path, secure
git-svn-id: file:///svn/phpbb/trunk@176 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3c48f4cf2f
commit
5654680b5b
1 changed files with 8 additions and 8 deletions
|
@ -95,7 +95,7 @@ function session_begin($user_id, $user_ip, $page_id, $session_length, $login = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setcookie($cookiename."[sessionid]", $session_id, $session_length);
|
setcookie($cookiename."[sessionid]", $session_id, $session_length, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -104,11 +104,11 @@ function session_begin($user_id, $user_ip, $page_id, $session_length, $login = 0
|
||||||
|
|
||||||
if(!empty($password) && AUTOLOGON)
|
if(!empty($password) && AUTOLOGON)
|
||||||
{
|
{
|
||||||
setcookie($cookiename."[useridref]", $password, $cookielife);
|
setcookie($cookiename."[useridref]", $password, $cookielife, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
}
|
}
|
||||||
setcookie($cookiename."[userid]", $user_id, $cookielife);
|
setcookie($cookiename."[userid]", $user_id, $cookielife, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
setcookie($cookiename."[sessionstart]", $current_time, $cookielife);
|
setcookie($cookiename."[sessionstart]", $current_time, $cookielife, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
setcookie($cookiename."[sessiontime]", $current_time, $session_length);
|
setcookie($cookiename."[sessiontime]", $current_time, $session_length, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
|
||||||
$userdata = $db->sql_fetchrow($result);
|
$userdata = $db->sql_fetchrow($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($userdata[user_id] != ''){ // The ID in the cookie was really in the DB.
|
if($userdata['user_id'] != ''){ // The ID in the cookie was really in the DB.
|
||||||
//
|
//
|
||||||
// Check for user and ip ban ...
|
// Check for user and ip ban ...
|
||||||
//
|
//
|
||||||
|
@ -231,7 +231,7 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
|
||||||
// Update was success, send current time to cookie
|
// Update was success, send current time to cookie
|
||||||
// and return userdata
|
// and return userdata
|
||||||
//
|
//
|
||||||
setcookie($cookiename."[sessiontime]", $current_time, $session_length);
|
setcookie($cookiename."[sessiontime]", $current_time, $session_length, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
|
|
||||||
return $userdata;
|
return $userdata;
|
||||||
} // if (affectedrows)
|
} // if (affectedrows)
|
||||||
|
@ -346,7 +346,7 @@ function session_end($session_id, $user_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
setcookie($cookiename."[sessionid]", "");
|
setcookie($cookiename."[sessionid]", "");
|
||||||
setcookie($cookiename."[sessionend]", $current_time, $cookielife);
|
setcookie($cookiename."[sessionend]", $current_time, $cookielife, $cookiepath, $cookiedomain, $cookiesecure);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue