From 0901633349fa7ef476fb0fd80bac89a61a77416a Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 5 Nov 2023 20:21:13 +0100 Subject: [PATCH] [ticket/9687] Improve ban query PHPBB3-9687 --- phpBB/includes/functions_user.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 1939d0ff78..340f03c0c0 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -749,8 +749,9 @@ function user_delete($mode, $user_ids, $retain_username = true) $db->sql_query($sql); // Delete the user_id from the banlist - $sql = 'DELETE FROM ' . BANS_TABLE . ' - WHERE ban_mode = \'user\' AND ' . $db->sql_in_set('ban_userid', $user_ids); + $sql = 'DELETE FROM ' . BANS_TABLE . " + WHERE ban_mode = 'user' + AND " . $db->sql_in_set('ban_userid', $user_ids); $db->sql_query($sql); // Delete the user_id from the session table