function user_role_load

Fetches a user role by role ID.

Parameters

$rid: A string representing the role ID.

Return value

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

1 string reference to 'user_role_load'
RoleFormController::form in drupal/core/modules/user/lib/Drupal/user/RoleFormController.php
Returns the actual form array to be built.

File

drupal/core/modules/user/user.module, line 1875
Enables the user registration and login system.

Code

function user_role_load($rid) {
  return entity_load('user_role', $rid);
}