From 2c3c1a93030bf62ccc2d4a3386b756f01b672d94 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 12 Mar 2010 15:56:30 +0000 Subject: - Patch #705306 by moshe weitzman: user_cancel_delete() method calls into a 'standard' user_delete_multiple() API. --- modules/comment/comment.module | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 56fe0982c..6fdb9867e 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1312,15 +1312,17 @@ function comment_user_cancel($edit, $account, $method) { ->condition('last_comment_uid', $account->uid) ->execute(); break; - - case 'user_cancel_delete': - module_load_include('inc', 'comment', 'comment.admin'); - $cids = db_query('SELECT c.cid FROM {comment} c WHERE uid = :uid', array(':uid' => $account->uid))->fetchCol(); - comment_delete_multiple($cids); - break; } } +/** + * Implements hook_user_delete(). + */ +function comment_user_delete($account) { + $cids = db_query('SELECT c.cid FROM {comment} c WHERE uid = :uid', array(':uid' => $account->uid))->fetchCol(); + comment_delete_multiple($cids); +} + /** * This is *not* a hook_access() implementation. This function is called * to determine whether the current user has access to a particular comment. -- cgit v1.2.3