hook_domaingrants

Versions
domain
hook_domaingrants(&$grants, $account, $op)

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.

See also

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

Code

./API.php, line 38

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

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List