diff options
Diffstat (limited to 'tests/mock/user.php')
-rw-r--r-- | tests/mock/user.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/mock/user.php b/tests/mock/user.php index ec14ce430e..bd547b3973 100644 --- a/tests/mock/user.php +++ b/tests/mock/user.php @@ -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; + } } |