function comment_user

6.x comment.module comment_user($type, $edit, &$user, $category = NULL)

Implementation of hook_user().

File

drupal-6.x/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);
  }
}