You are here

function hook_domaingrants in Domain Access 5

Same name and namespace in other branches
  1. 6.2 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/5 for more detail.

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

domain_strict_domaingrants()

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()
1 invocation of hook_domaingrants()
domain_node_grants in ./domain.module
Implement hook_node_grants.

File

./API.php, line 36
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;
}