function user_tools_user_all_access in Module Grants 6.4
Same name and namespace in other branches
- 6.3 user_tools/user_tools.module \user_tools_user_all_access()
Return TRUE only if the user account has ALL of the supplied permissions.
Parameters
$permissions: An array of permissions (strings)
$account: The user account object. Defaults to the logged-in user if omitted.
Return value
bool
1 string reference to 'user_tools_user_all_access'
- module_grants_monitor_menu in module_grants_monitor/
module_grants_monitor.module - Implementation of hook_menu().
File
- user_tools/
user_tools.module, line 18 - Generic reusable functions involving user objects.
Code
function user_tools_user_all_access($permissions, $account = NULL) {
foreach ($permissions as $permission) {
if (!user_access($permission, $account)) {
return FALSE;
}
}
return TRUE;
}