summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module14
1 files changed, 8 insertions, 6 deletions
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,16 +1312,18 @@ 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.
*