You are here

function pm_block_user_user_cancel in Privatemsg 7.2

Same name and namespace in other branches
  1. 7 pm_block_user/pm_block_user.module \pm_block_user_user_cancel()

Implements hook_user_cancel().

File

pm_block_user/pm_block_user.module, line 349
Allows users to block other users from sending them any messages

Code

function pm_block_user_user_cancel($edit, $account, $method) {

  // Always delete, we don't need to keep anonymous blocking rules.
  db_delete('pm_block_user')
    ->condition(db_or()
    ->condition('author', $account->uid)
    ->condition('recipient', $account->uid))
    ->execute();
}