function nodeaccess_node_grants in Nodeaccess 5
Same name and namespace in other branches
- 8.2 nodeaccess.module \nodeaccess_node_grants()
- 8 nodeaccess.module \nodeaccess_node_grants()
- 6.2 nodeaccess.module \nodeaccess_node_grants()
- 6 nodeaccess.module \nodeaccess_node_grants()
- 7 nodeaccess.module \nodeaccess_node_grants()
Implementation of hook_node_grants().
File
- ./
nodeaccess.module, line 560
Code
function nodeaccess_node_grants($account, $op) {
global $user;
$roles = is_array($user->roles) ? array_keys($user->roles) : array(
-1,
);
return array(
'nodeaccess_rid' => $roles,
'nodeaccess_uid' => array(
$user->uid,
),
'nodeaccess_author' => array(
$user->uid,
),
);
}