hook_domaingrants

Definition

hook_domaingrants(&$grants, $account, $op)
API.php, line 36

Description

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.

@see domain_strict_domaingrants()

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.

Related topics

Namesort iconDescription
Domain hook functionsCore hooks for the Domain module suite.

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;
}