function user_role_load

Fetches a user role by role ID.

Parameters

$rid: An integer representing the role ID.

Return value

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

See also

user_role_load_by_name()

2 calls to user_role_load()
UserRoleAdminTestCase::testRoleWeightChange in drupal-7.x/modules/user/user.test
Test user role weight change operation.
user_role_delete in drupal-7.x/modules/user/user.module
Delete a user role from database.

Archivo

drupal-7.x/modules/user/user.module, line 2915
Enables the user registration and login system.

Código

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