function pm_block_user_has_blocked in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 pm_block_user/pm_block_user.module \pm_block_user_has_blocked()
- 7 pm_block_user/pm_block_user.module \pm_block_user_has_blocked()
Checks if author is blocked by the recipient.
Parameters
$author: The user that would send a message.
$recipient: The user that would receive the message.
Return value
TRUE if the recipient has blocked the author.
3 calls to pm_block_user_has_blocked()
- pm_block_user_block_validate in pm_block_user/
pm_block_user.pages.inc - Validate user names.
- pm_block_user_form in pm_block_user/
pm_block_user.pages.inc - @file User menu callbacks for pm_block_user.module.
- _pm_block_user_access in pm_block_user/
pm_block_user.module - Provides access argument for blocking user menu item.
File
- pm_block_user/
pm_block_user.module, line 146 - Allows users to block other users from sending them any messages
Code
function pm_block_user_has_blocked($author, $recipient) {
return db_result(db_query('SELECT 1 FROM {pm_block_user} WHERE author = %d AND recipient = %d', $author->uid, $recipient->uid));
}