diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-12 15:56:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-12 15:56:30 +0000 |
commit | 2c3c1a93030bf62ccc2d4a3386b756f01b672d94 (patch) | |
tree | a491665a772f1f99b23f1766f1b3ae749be91641 /modules/comment | |
parent | 160b42812c2ec0a32fcdcd02f32d3f86e549fac7 (diff) | |
download | brdo-2c3c1a93030bf62ccc2d4a3386b756f01b672d94.tar.gz brdo-2c3c1a93030bf62ccc2d4a3386b756f01b672d94.tar.bz2 |
- Patch #705306 by moshe weitzman: user_cancel_delete() method calls into a 'standard' user_delete_multiple() API.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 14 |
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. * |