1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[ticket/10729] Update message_edit_user when user being deleted

PHPBB3-10729
This commit is contained in:
Oliver Schramm 2014-07-17 16:30:22 +02:00
parent 53f597b6d0
commit da6b378e64

View File

@ -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;