You are here

function comment_user in Drupal 6

Same name and namespace in other branches
  1. 4 modules/comment.module \comment_user()
  2. 5 modules/comment/comment.module \comment_user()

Implementation of hook_user().

File

modules/comment/comment.module, line 639
Enables users to comment on published content.

Code

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);
  }
}