function privatemsg_user_cancel

7-1 privatemsg.module privatemsg_user_cancel($edit, $account, $method)
7-2 privatemsg.module privatemsg_user_cancel($edit, $account, $method)

Implements hook_user_cancel().

File

./privatemsg.module, line 1283
Allows users to send private messages to other users.

Code

function privatemsg_user_cancel($edit, $account, $method) {
  switch ($method) {
    case 'user_cancel_reassign':
      db_update('pm_message')->condition('author', $account->uid)->fields(array('author' => 0))->execute();
      break;
    case 'user_cancel_block_unpublish':
      _privatemsg_delete_data($account);
      break;
  }
}