summaryrefslogtreecommitdiff
path: root/modules/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment.module')
-rw-r--r--modules/comment.module4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/comment.module b/modules/comment.module
index f7c9383f0..1b6a17217 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -335,6 +335,10 @@ function comment_user($type, $edit, &$user, $category = NULL) {
return $form;
}
+ elseif ($type == 'delete') {
+ db_query('UPDATE {comments} SET uid = 0 WHERE uid = %d', $user->uid);
+ db_query('UPDATE {node_comment_statistics} SET last_comment_uid = 0 WHERE last_comment_uid = %d', $user->uid);
+ }
}
/**