You are here

function privatemsg_unblock_user in Privatemsg 5.3

Same name and namespace in other branches
  1. 5 privatemsg.module \privatemsg_unblock_user()
1 call to privatemsg_unblock_user()
privatemsg_unblock_user_form_submit in ./privatemsg.module

File

./privatemsg.module, line 491

Code

function privatemsg_unblock_user($author, $recipient = NULL) {
  global $user;
  $recipient = $recipient ? $recipient : $user->uid;
  if (privatemsg_user_blocked($author, $recipient)) {
    db_query("DELETE FROM {privatemsg_block_user} WHERE author = %d AND recipient = %d", $author, $recipient);
    drupal_set_message(t('User has been unblocked'));
  }
}