function messaging_method_permission in Messaging 6.3
Same name and namespace in other branches
- 5 messaging.module \messaging_method_permission()
- 6.4 messaging.module \messaging_method_permission()
- 6 messaging.module \messaging_method_permission()
- 6.2 messaging.module \messaging_method_permission()
- 7 messaging.module \messaging_method_permission()
Check permission for method and account
Parameters
$method: Sending method id
$account: User account to check permission
2 calls to messaging_method_permission()
- messaging_method_default in ./
messaging.module - Returns default messaging method
- messaging_method_list in ./
messaging.module - List sending methods
File
- ./
messaging.module, line 372
Code
function messaging_method_permission($method, $account = NULL) {
$info = messaging_method_info($method);
// This sending method may be disabled
if (!$info) {
return FALSE;
}
elseif (!empty($info['access'])) {
return user_access($info['access'], $account);
}
else {
return TRUE;
}
}