get_role_name

Description

This method is similar to UM()->user()->get_role() but returns the role name instead of slug.

Usage

<?php UM()->roles()->get_role_name(); ?>

Returns

The user role’s name.

Examples

Do something if the user’s role is Paid Customer

<?php um_fetch_user( 12 ); 
if ( UM()->user()->get_role_name() == 'Paid Customer' ) {
 // Show this to paid customers }
 else { 
 // You are a free member
 } 
?>