diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_user.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index ead2834a5f..72383c1501 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -533,6 +533,12 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas } $sql_usernames = implode(', ', $sql_usernames); + // Make sure we have been given someone to ban + if (empty($sql_usernames)) + { + trigger_error($user->lang['NO_USER_SPECIFIED']); + } + $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE username IN (' . $sql_usernames . ')'; |