1 user.module user_role_load_by_name($role_name)

Legacy wrapper function preserved for backwards-compatibility. This function is no longer used by Backdrop core, since all roles are loaded by name now. See https://docs.backdropcms.org/change-records/converted-user-roles-to-cmi

Do not call this function; use user_role_load() instead.

Parameters

$role_name: A string representing the role name.

Return value

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

Deprecated

since 1.0.0

See also

user_role_load()

File

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

Code

function user_role_load_by_name($role_name) {
  watchdog_deprecated_function('user', __FUNCTION__, t('Change record:') . ' ' . l(t('Converted User roles to CMI'), 'https://docs.backdropcms.org/change-records/converted-user-roles-to-cmi', array('attributes' => array('target' => '_blank'))));
  user_role_load($role_name);
}