function privatemsg_privatemsg_alter in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_privatemsg_alter()
Implementation of hook privatemsg_alter().
File
- ./
privatemsg.module, line 451
Code
function privatemsg_privatemsg_alter($sender = NULL, $recipient = NULL, $subject = NULL, $body = NULL, $format = NULL, $thread = NULL, $type = NULL) {
$key = _privatemsg_get_type_key($type);
// use isset() and ! here to determine if the user has actually set the preference to FALSE
// explicitly - allow message otherwise (if the user has specified no preference)
if (isset($recipient->{$key}) && !$recipient->{$key}) {
return FALSE;
}
return TRUE;
}