You are here

function og_role_load in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.module \og_role_load()

Fetch a user role from database.

Parameters

$rid: An integer with the role ID.

Return value

A fully-loaded role object if a role with the given ID exists, FALSE otherwise.

9 calls to og_role_load()
og_role_change_permissions in ./og.module
Change permissions for a user role.
og_role_delete in ./og.module
Delete a user role from database.
og_ui_access_bundle_role in og_ui/og_ui.module
Menu access; Check permissions for role editing.
og_ui_access_entity_role in og_ui/og_ui.module
Menu access; Check permissions for role editing - For a specific entity.
og_ui_admin_permissions in og_ui/og_ui.admin.inc
Menu callback: administer permissions.

... See full list

File

./og.module, line 2878
Enable users to create and manage groups with roles and permissions.

Code

function og_role_load($rid) {
  return db_select('og_role', 'r')
    ->fields('r')
    ->condition('rid', $rid)
    ->execute()
    ->fetchObject();
}