function hook_domaingrants in Domain Access 6.2
Same name and namespace in other branches
- 5 API.php \hook_domaingrants()
Notify other modules that we are granting access to a node.
This hook allows Domain Access modules to overwrite default behaviors. See http://api.drupal.org/api/function/hook_node_grants/6 for more detail.
Note: In Drupal 7, this is a core feature.
Parameters
&$grants: The existing default $grants, passed by reference.
$account: The user object of the user requesting the node.
$op: The node operation being performed (view, update, or delete).
Return value
No return value. Modify the $grants array, passed by reference.
See also
Related topics
1 function implements hook_domaingrants()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_strict_domaingrants in domain_strict/
domain_strict.module - Implement hook_domaingrants()
2 invocations of hook_domaingrants()
- domain_node_grants in ./
domain.module - Implement hook_node_grants.
- _domain_views_alter_grants in domain_views/
domain_views.module - Helper function to hook_domaingrants(). This should be replaced by a drupal_alter().
File
- ./
API.php, line 38 - API documentation file.
Code
function hook_domaingrants(&$grants, $account, $op) {
// Add a sample grant privilege to let a user see their content at all times.
$grants['domain_example'][] = $account->uid;
}