function content_access_get_permissions_by_role in Content Access 6
Gets the permissions for the role of the given id.
2 calls to content_access_get_permissions_by_role()
- content_access_admin_settings_submit in ./
content_access.admin.inc - content_access_update_6001 in ./
content_access.install - Upgrade from d5 to d6
File
- ./
content_access.admin.inc, line 213 - Content access administration UI.
Code
function content_access_get_permissions_by_role() {
$result = db_query('SELECT r.rid, p.perm FROM {role} r LEFT JOIN {permission} p ON r.rid = p.rid');
$permissions = array();
while ($role = db_fetch_object($result)) {
$permissions[$role->rid] = array_filter(drupal_map_assoc(explode(', ', $role->perm)));
}
return $permissions;
}