function simple_access_get_roles in Simple Access 6.2
Same name and namespace in other branches
- 5.2 simple_access.module \simple_access_get_roles()
- 5 simple_access.module \simple_access_get_roles()
- 7.2 simple_access.module \simple_access_get_roles()
2 calls to simple_access_get_roles()
File
- ./
simple_access.module, line 494 - 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_roles($gid) {
$roles = array();
$sql = db_query('SELECT rid FROM {simple_access_roles} WHERE gid = %d', $gid);
while ($row = db_fetch_object($sql)) {
$roles[] = $row->rid;
}
return $roles;
}