You are here

function og_role_load in Organic groups 7

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

Fetch a user role from database.

Parameters

$role: An integer with the role ID.

Return value

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

3 calls to og_role_load()
og_role_delete in ./og.module
Delete a user role from database.
og_ui_user_admin_roles in og_ui/og_ui.admin.inc
Menu callback: administer roles.
og_ui_user_admin_roles_validate in og_ui/og_ui.admin.inc

File

./og.module, line 2592
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();
}