From 5879c1c5c1e7b0860a76a0fc62f62d171c2488f0 Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Fri, 21 Jul 2006 20:44:27 +0000 Subject: * Error handling on bans * Missing language strings * Grammatical correction in viewtopic (singular vs plural) git-svn-id: file:///svn/phpbb/trunk@6199 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/includes/functions_user.php') 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 . ')'; -- cgit v1.2.1