You are here

function simple_access_get_groups in Simple Access 6.2

Same name and namespace in other branches
  1. 8.3 simple_access.module \simple_access_get_groups()
  2. 5.2 simple_access.module \simple_access_get_groups()
  3. 5 simple_access.module \simple_access_get_groups()
  4. 7.2 simple_access.module \simple_access_get_groups()
6 calls to simple_access_get_groups()
simple_access_group_grant_form in ./simple_access.module
Configure grant group permissions
simple_access_group_revoke_form in ./simple_access.module
Configure revoke group permissions
simple_access_node_access_explain in ./simple_access.module
Implementation of hook_node_access_explain()
simple_access_page_overview in ./simple_access.admin.inc
@file House all the admin functions in inc to make the foot print a lot smaller.
simple_access_views_plugin_group::options_form in views/simple_access_views_plugin_group.inc

... See full list

File

./simple_access.module, line 535
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;
}