domain_views_get_grants($account = NULL)Helper function to return the node grants for this user.
$account The account object of the user requesting the View.
$grants An array indicating which domains the user may access.
domain_views/domain_views.module, line 121
<?php
function domain_views_get_grants($account = NULL) {
global $user, $_domain;
static $grants;
if (empty($account)) {
$account = $user;
}
if (isset($grants[$account->uid])) {
return $grants[$account->uid];
}
$user_grants = domain_node_grants($account, 'view');
// Domain All gets in the way of normal grants.
if (!empty($user_grants['domain_all'])) {
$user_grants['domain_id'] = array($_domain['domain_id']);
_domain_views_alter_grants($user_grants);
}
$grants[$account->uid] = $user_grants;
return $grants[$account->uid];
}
?>