From d907d066f2e0d7974766370b11dab69a59962f97 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 15 Mar 2006 13:03:57 +0000 Subject: - adding ability to assign moderator specific ban options - fixing destroying of sql caches - fixing referencing of sql cached queries if more than one are active on one page - other fixes git-svn-id: file:///svn/phpbb/trunk@5633 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 269fee2c26..3cf2c4ec4a 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -923,40 +923,7 @@ function validate_email($email) return 'EMAIL_INVALID'; } - /** - * @todo This is a duplication of code from session->check_ban() - */ - $sql = 'SELECT ban_ip, ban_userid, ban_email, ban_exclude, ban_give_reason, ban_end - FROM ' . BANLIST_TABLE . ' - WHERE ban_end >= ' . time() . ' - OR ban_end = 0'; - $result = $db->sql_query($sql); - - $banned = false; - if ($row = $db->sql_fetchrow($result)) - { - do - { - if (!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $email)) - { - if (!empty($row['ban_exclude'])) - { - $banned = false; - break; - } - else - { - $banned = true; - $ban_row = $row; - // Don't break. Check if there is an exclude rule for this user - } - } - } - while ($row = $db->sql_fetchrow($result)); - } - $db->sql_freeresult($result); - - if ($banned == true) + if ($user->check_ban('', '', $email, true) == true) { return 'EMAIL_BANNED'; } -- cgit v1.2.1