mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-25 04:24:31 +02:00
Fix bug #40245 - Attachments table is not being updated when deleting user and retaining his posts
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9599 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -421,6 +421,11 @@ function user_delete($mode, $user_id, $post_username = false)
|
||||
WHERE topic_last_poster_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||
SET poster_id = ' . ANONYMOUS . "
|
||||
WHERE poster_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Since we change every post by this author, we need to count this amount towards the anonymous user
|
||||
|
||||
// Update the post count for the anonymous user
|
||||
|
Reference in New Issue
Block a user