You are here

function user_tools_user_any_access in Module Grants 6.4

Same name and namespace in other branches
  1. 6.3 user_tools/user_tools.module \user_tools_user_any_access()

Return if the user account has at least one 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

first permission found or FALSE if no access

1 call to user_tools_user_any_access()
module_grants_node_delete_confirm_submit in ./module_grants.pages.inc
Initiate node deletion and set the redirection page.
1 string reference to 'user_tools_user_any_access'
module_grants_monitor_menu in module_grants_monitor/module_grants_monitor.module
Implementation of hook_menu().

File

user_tools/user_tools.module, line 37
Generic reusable functions involving user objects.

Code

function user_tools_user_any_access($permissions, $account = NULL) {
  return user_tools_find_first_permission($permissions, $account) != NULL;
}