mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
[ticket/11579] Add remaining unit tests for validate_data functions
This now includes tests for usernames, passwords, emails, and jabber addresses. A few small changes had to be applied to phpbb_mock_cache and phpbb_mock_user in order to incorporate needed methods. PHPBB3-11579
This commit is contained in:
@@ -33,4 +33,17 @@ class phpbb_mock_user
|
||||
{
|
||||
$this->options[$item] = $value;
|
||||
}
|
||||
|
||||
public function check_ban($user_id = false, $user_ips = false, $user_email = false, $return = false)
|
||||
{
|
||||
$banned_users = $this->optionget('banned_users');
|
||||
foreach ($banned_users as $banned)
|
||||
{
|
||||
if ($banned == $user_id || $banned == $user_ips || $banned == $user_email)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user