| 7 user.module | user_role_load($rid) |
| 8 user.module | user_role_load($rid) |
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
2 calls to user_role_load()
File
- modules/
user/ user.module, line 2837 - Enables the user registration and login system.
Code
function user_role_load($rid) {
return db_select('role', 'r')
->fields('r')
->condition('rid', $rid)
->execute()
->fetchObject();
}
Login or register to post comments