From 5885925b0d2881277c22c6d70d86f1bc060fb133 Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Sun, 26 Mar 2006 19:31:00 +0000 Subject: #53348, Handling of deleted/blocked user accounts, patch by jreyero and Zen --- modules/comment/comment.module | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index f7c9383f0..1b6a17217 100644 --- a/modules/comment/comment.module +++ b/modules/comment/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); + } } /** -- cgit v1.2.3