aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-15 13:03:57 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-15 13:03:57 +0000
commitd907d066f2e0d7974766370b11dab69a59962f97 (patch)
tree146a203caa445298e084088c30311b959d00c9f1 /phpBB/includes/functions_user.php
parent8c3f94f9ae8a1333be8c01dd2e0be74dffc91831 (diff)
downloadforums-d907d066f2e0d7974766370b11dab69a59962f97.tar
forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.gz
forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.bz2
forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.xz
forums-d907d066f2e0d7974766370b11dab69a59962f97.zip
- 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
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php35
1 files changed, 1 insertions, 34 deletions
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';
}