get_role_name

Description

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

Usage

<?php $ultimatemember->user->get_role_name(); ?>

Returns

The user role’s name.

Examples

Do something if the user’s role is Paid Customer

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