function invoice_user_access_handler in Invoice 6
Same name and namespace in other branches
- 7 invoice.module \invoice_user_access_handler()
User access handler to support multiple permissions for a menu item
Parameters
array $permissions:
Return value
boolean
1 string reference to 'invoice_user_access_handler'
- invoice_menu in ./
invoice.module - Implementation of hook_menu()
File
- ./
invoice.module, line 136 - Invoice module
Code
function invoice_user_access_handler(array $permissions = array()) {
$allow = FALSE;
if (count($permissions) > 0) {
foreach ($permissions as $permission) {
if (user_access($permission)) {
$allow = TRUE;
break;
}
}
}
else {
$allow = TRUE;
}
return $allow;
}