aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2014-07-17 16:30:22 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2014-07-18 00:11:51 +0200
commitda6b378e64d2457ddbcd299d769ecf0167ffb9c8 (patch)
tree202fd28fb5a6226f166c29a0e3664228c9cc5c0b
parent53f597b6d0867ab15ae3a4dc5dbc56f633ff9633 (diff)
downloadforums-da6b378e64d2457ddbcd299d769ecf0167ffb9c8.tar
forums-da6b378e64d2457ddbcd299d769ecf0167ffb9c8.tar.gz
forums-da6b378e64d2457ddbcd299d769ecf0167ffb9c8.tar.bz2
forums-da6b378e64d2457ddbcd299d769ecf0167ffb9c8.tar.xz
forums-da6b378e64d2457ddbcd299d769ecf0167ffb9c8.zip
[ticket/10729] Update message_edit_user when user being deleted
PHPBB3-10729
-rw-r--r--phpBB/includes/functions_user.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index db98b8e7ca..20c371f8e5 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -502,6 +502,12 @@ function user_delete($mode, $user_id, $post_username = false)
WHERE post_edit_user = ' . $user_id;
$db->sql_query($sql);
+ // Change user_id to anonymous for pms edited by this user
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_edit_user = ' . ANONYMOUS . '
+ WHERE message_edit_user = ' . $user_id;
+ $db->sql_query($sql);
+
// Delete user log entries about this user
$sql = 'DELETE FROM ' . LOG_TABLE . '
WHERE reportee_id = ' . $user_id;