You are here

function _get_role_name in Ubercart 5

Function gets role name

@return: A string containing the name of the role, returns FALSE if rid is invalid

Parameters

$rid: The Drupal role id number

7 calls to _get_role_name()
uc_roles_deletion_form in uc_roles/uc_roles.module
Form builder for role expirations
uc_roles_expiration in uc_roles/uc_roles.module
Menu callback for viewing expirations
uc_roles_feature_form_submit in uc_roles/uc_roles.module
uc_roles_order in uc_roles/uc_roles.module
Implementation of hook_order().
uc_roles_token_values in uc_roles/uc_roles.module
Implementation of hook_token_values().

... See full list

File

uc_roles/uc_roles.module, line 1046
Grants roles upon accepted payment of products

Code

function _get_role_name($rid) {
  $roles = user_roles(TRUE);
  return !is_null($roles[$rid]) ? $roles[$rid] : FALSE;
}