1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +02:00

[ticket/9650] Do not allow banning the anonymous user by username

Banning anonymous can result in bad things, like not being able to log in.  However, it was possible until now.

PHPBB3-9650
This commit is contained in:
Josh Woody
2010-07-05 22:22:25 -05:00
parent b7ae0fe4e9
commit ae967d16f1
3 changed files with 10 additions and 3 deletions

View File

@@ -231,6 +231,11 @@ class acp_users
trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if ($user_id == ANONYMOUS)
{
trigger_error($user->lang['CANNOT_BAN_ANONYMOUS'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
}
if ($user_row['user_type'] == USER_FOUNDER)
{
trigger_error($user->lang['CANNOT_BAN_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);