aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorRuslan Uzdenov <rxu@mail.ru>2009-06-16 14:36:12 +0000
committerRuslan Uzdenov <rxu@mail.ru>2009-06-16 14:36:12 +0000
commitbfc8906a5ed4b99d0c592972b3267fe52d5da257 (patch)
tree461f7d5e489b4808ae6c73c3826fbf810dff7494 /phpBB/includes/functions_user.php
parentce144ab0baaafa10bf3e37812e2f5875680de499 (diff)
downloadforums-bfc8906a5ed4b99d0c592972b3267fe52d5da257.tar
forums-bfc8906a5ed4b99d0c592972b3267fe52d5da257.tar.gz
forums-bfc8906a5ed4b99d0c592972b3267fe52d5da257.tar.bz2
forums-bfc8906a5ed4b99d0c592972b3267fe52d5da257.tar.xz
forums-bfc8906a5ed4b99d0c592972b3267fe52d5da257.zip
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
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index ab0122866c..144b323959 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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