function _uc_role_get_name in Ubercart 8.4
Gets role name.
Parameters
int $rid: The Drupal role id number.
Return value
string|false A string containing the name of the role, returns FALSE if rid is invalid.
9 calls to _uc_role_get_name()
- RenewRole::doExecute in uc_role/
src/ Plugin/ RulesAction/ RenewRole.php - Renews an order's product roles.
- RoleDeleteForm::buildForm in uc_role/
src/ Form/ RoleDeleteForm.php - Form constructor.
- RoleExpirationForm::buildForm in uc_role/
src/ Form/ RoleExpirationForm.php - Form constructor.
- RoleFeatureForm::submitForm in uc_role/
src/ Form/ RoleFeatureForm.php - Form submission handler.
- uc_role_delete in uc_role/
uc_role.module - Deletes an expiration using user id or user id and rid.
File
- uc_role/
uc_role.module, line 417 - Grants roles upon accepted payment of products.
Code
function _uc_role_get_name($rid) {
$roles = user_role_names(TRUE);
return !is_null($roles[$rid]) ? $roles[$rid] : FALSE;
}