user_role_load($rid)
Fetches a user role by role ID.
string $rid: A string representing the role ID.
\Drupal\user\RoleInterface|null A fully-loaded role object if a role with the given ID exists, or NULL otherwise.
in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\user\Entity\Role::load().
function user_role_load($rid) { return Role::load($rid); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!user!user.module/function/user_role_load/8.1.x