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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user