Fetches a user role by role name.
$role_name: A string representing the role name.
A fully-loaded role object if a role with the given name exists, or FALSE otherwise.
function user_role_load_by_name($role_name) {
return db_select('role', 'r')
->fields('r')
->condition('name', $role_name)
->execute()
->fetchObject();
}