function pm_block_user_user in Privatemsg 6
Same name and namespace in other branches
- 6.2 pm_block_user/pm_block_user.module \pm_block_user_user()
Implement hook_user().
File
- pm_block_user/
pm_block_user.module, line 577 - Allows users to block other users from sending them any messages
Code
function pm_block_user_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'delete':
// Delete blocking rules which involve this user.
db_query("DELETE FROM {pm_block_user} WHERE author = %d OR recipient = %d", $account->uid, $account->uid);
break;
}
}