diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 312ef8369e..91261ba90d 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -92,6 +92,7 @@
[Fix] Missing end " in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)
[Fix] Friend/foe system displays posts made by foes while composing (Bug #40325 - Patch by TerraFrost and Highway of Life)
[Fix] Check forum_image whether it exists (Bug #39005 - Patch by TerraFrost)
+ [Fix] The sql query in acp_users.php lacks a condition (Bug #40275 - Patch by grimskies)
[Fix] Added missing read permission information for some phpbb_chmod() calls
[Fix] Correctly display future dates (Bug #38755)
[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 05a087f4c3..dd2b838f83 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -972,6 +972,7 @@ class acp_users
{
$sql = 'DELETE FROM ' . LOG_TABLE . '
WHERE log_type = ' . LOG_USERS . "
+ AND reportee_id = $user_id
$where_sql";
$db->sql_query($sql);