From 026af5df34694c8ca5c3708f3fe23fd10ec160cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 6 Oct 2008 11:30:12 +0000 Subject: - Patch #310212 by justinrandell, catch, et all: killed in _user hook, as well as two small kittens. --- modules/comment/comment.module | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 80e9aad2f..d020f8d31 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -600,13 +600,11 @@ function comment_nodeapi(&$node, $op, $arg = 0) { } /** - * Implementation of hook_user(). + * Implementation of hook_user_delete(). */ -function comment_user($type, $edit, &$user, $category = NULL) { - if ($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); - } +function comment_user_delete(&$edit, &$user, $category = NULL) { + 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