function comment_user_predelete

Implements hook_user_predelete().

File

drupal/core/modules/comment/comment.module, line 1309
Enables users to comment on published content.

Code

function comment_user_predelete($account) {
  $cids = db_query('SELECT c.cid FROM {comment} c WHERE uid = :uid', array(
    ':uid' => $account->uid,
  ))
    ->fetchCol();
  entity_delete_multiple('comment', $cids);
}