aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c562ac666f..cb3306745e 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -538,6 +538,17 @@ function user_delete($mode, $user_id, $post_username = false)
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
+ // Delete user log entries about this user
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE reportee_id = ' . $user_id;
+ $db->sql_query($sql);
+
+ // Change user_id to anonymous for this users triggered events
+ $sql = 'UPDATE ' . LOG_TABLE . '
+ SET user_id = ' . ANONYMOUS . '
+ WHERE user_id = ' . $user_id;
+ $db->sql_query($sql);
+
// Delete the user_id from the zebra table
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
WHERE user_id = ' . $user_id . '