mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Altered ban checking, this will be replaced by auth I think
git-svn-id: file:///svn/phpbb/trunk@270 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7b51bc1dc2
commit
40e59aad2b
1 changed files with 5 additions and 7 deletions
|
@ -223,13 +223,11 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
|
||||||
// session_id exists so go ahead and attempt
|
// session_id exists so go ahead and attempt
|
||||||
// to grab all data in preparation
|
// to grab all data in preparation
|
||||||
//
|
//
|
||||||
$sql = "SELECT u.*, s.*, b.ban_ip, b.ban_userid
|
$sql = "SELECT u.*, s.*
|
||||||
FROM ".SESSIONS_TABLE." s
|
FROM ".SESSIONS_TABLE." s, ".USERS_TABLE." u
|
||||||
LEFT JOIN ".BANLIST_TABLE." b ON b.ban_ip = '$int_ip' OR b.ban_userid = u.user_id
|
|
||||||
LEFT JOIN ".USERS_TABLE." u ON u.user_id = s.session_user_id
|
|
||||||
WHERE s.session_id = '".$sessiondata['sessionid']."'
|
WHERE s.session_id = '".$sessiondata['sessionid']."'
|
||||||
AND s.session_ip = '$int_ip'
|
AND s.session_ip = '$int_ip'
|
||||||
AND b.ban_start < $current_time AND b.ban_end > $current_time";
|
AND u.user_id = s.session_user_id";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
if (!$result)
|
if (!$result)
|
||||||
{
|
{
|
||||||
|
@ -251,11 +249,11 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
|
||||||
if(isset($userdata['user_id']))
|
if(isset($userdata['user_id']))
|
||||||
{
|
{
|
||||||
|
|
||||||
if($userdata['ban_ip'] || $userdata['ban_userid'])
|
/* if($userdata['ban_ip'] || $userdata['ban_userid'])
|
||||||
{
|
{
|
||||||
error_die(BANNED);
|
error_die(BANNED);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$SID = ($sessionmethod == SESSION_METHOD_GET) ? "sid=".$sessiondata['sessionid'] : "";
|
$SID = ($sessionmethod == SESSION_METHOD_GET) ? "sid=".$sessiondata['sessionid'] : "";
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue