function search_config_get_access in Search configuration 7
Same name and namespace in other branches
- 8 search_config.module \search_config_get_access()
Helper function to test the users configured access rights to a field.
Parameters
bool $remove: A flag to block access.
array $grant: An additional array of roles to overrule the main flag
1 call to search_config_get_access()
- _search_config_advanced_form in ./
search_config.node.inc - This function implements the options to configure the default Drupal search form, including type filter, field visibility, form visibility, etc.
File
- ./
search_config.module, line 284 - Main functionality for the Search Configuration module.
Code
function search_config_get_access($remove, $grant) {
global $user;
if ($remove) {
return (bool) array_intersect_key($user->roles, array_filter($grant));
}
return TRUE;
}