1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2006-03-15 13:03:57 +00:00
parent 8c3f94f9ae
commit d907d066f2
22 changed files with 440 additions and 133 deletions

View File

@@ -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';
}