function simple_access_get_groups in Simple Access 5.2
Same name and namespace in other branches
- 8.3 simple_access.module \simple_access_get_groups()
- 5 simple_access.module \simple_access_get_groups()
- 6.2 simple_access.module \simple_access_get_groups()
- 7.2 simple_access.module \simple_access_get_groups()
5 calls to simple_access_get_groups()
- simple_access_action_group_grant_form in inc/
workflow_ng.inc - Configure grant group permissions
- simple_access_action_group_revoke_form in inc/
workflow_ng.inc - Configure revoke group permissions
- simple_access_nodes in ./
simple_access.module - List hidden, editable, and deletable nodes
- simple_access_node_access_explain in ./
simple_access.module - Implementation of hook_node_access_explain()
- simple_access_page_overview in ./
simple_access.module
File
- ./
simple_access.module, line 840 - This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.
Code
function simple_access_get_groups() {
$groups = array();
$result = db_query('SELECT gid, name, weight FROM {simple_access_groups} ORDER BY weight, name');
while ($g = db_fetch_array($result)) {
$groups[$g['gid']]['name'] = $g['name'];
$groups[$g['gid']]['gid'] = $g['gid'];
$groups[$g['gid']]['weight'] = $g['weight'];
$groups[$g['gid']]['roles'] = simple_access_get_roles($g['gid']);
}
return $groups;
}