function privatemsg_block_user in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_block_user()
1 call to privatemsg_block_user()
2 string references to 'privatemsg_block_user'
File
- ./
privatemsg.module, line 482
Code
function privatemsg_block_user($author, $recipient = NULL) {
global $user;
$recipient = $recipient ? $recipient : $user->uid;
if (!privatemsg_user_blocked($author, $recipient)) {
db_query("INSERT INTO {privatemsg_block_user} (author, recipient) VALUES (%d, %d)", $author, $recipient);
drupal_set_message(t('User has been blocked'));
}
}