diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-11 12:24:50 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-05-11 12:24:50 +0000 |
commit | caaf04c1971c49985c13a19c0711b6b74e3f17e6 (patch) | |
tree | 75c95f85ed5c749cea5a0dc443f010f90ffd4e85 | |
parent | 40e59aad2b2c5343b9270172a445ab4f5badbe7d (diff) | |
download | forums-caaf04c1971c49985c13a19c0711b6b74e3f17e6.tar forums-caaf04c1971c49985c13a19c0711b6b74e3f17e6.tar.gz forums-caaf04c1971c49985c13a19c0711b6b74e3f17e6.tar.bz2 forums-caaf04c1971c49985c13a19c0711b6b74e3f17e6.tar.xz forums-caaf04c1971c49985c13a19c0711b6b74e3f17e6.zip |
Altered ban checking, this will be replaced by auth I think
git-svn-id: file:///svn/phpbb/trunk@271 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/sessions.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index 4a6beacf84..4d0db4712d 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -249,7 +249,24 @@ function session_pagestart($user_ip, $thispage_id, $session_length) if(isset($userdata['user_id'])) { -/* if($userdata['ban_ip'] || $userdata['ban_userid']) + // + // Initial ban check against IP and userid + // Is this really needed in this form? + // The new auth system will probably take care + // of all this on a fair 'fairier' level + // +/* $sql = "SELECT ban_ip, ban_userid + FROM ".BANLIST_TABLE." + WHERE (ban_ip = '$int_ip' OR ban_userid = '".$userdata['user_id']."') + AND (ban_start < $current_time AND ban_end > $current_time )"; + $ban_result = $db->sql_query($sql); + if (!$ban_result) + { + error_die(SQL_QUERY, "Couldn't obtain ban information.", __LINE__, __FILE__); + } + $ban_info = $db->sql_fetchrow($ban_result); + + if($ban_info['ban_ip'] || $ban_info['ban_userid']) { error_die(BANNED); } |