function acl_node_grants in ACL 6
Same name and namespace in other branches
- 8 acl.module \acl_node_grants()
- 5 acl.module \acl_node_grants()
- 7 acl.module \acl_node_grants()
Implementation of hook_node_grants().
File
- ./
acl.module, line 178 - An API module providing by-user access control lists.
Code
function acl_node_grants($account, $op) {
$array = array(
'acl' => array(),
);
$result = db_query("SELECT acl_id FROM {acl_user} WHERE uid = %d", $account->uid);
while ($row = db_fetch_object($result)) {
$array['acl'][] = $row->acl_id;
}
return !empty($array['acl']) ? $array : NULL;
}