Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Display Role as part of Profile

@shanebp

Moderator

The role ID is the role name.

If you know the possible role names, you can do something like:

$userole = $user->roles[0];
if ( $userole == 'senior-fellow' );
   echo 'Senior Fellow'; 
elseif ( $userole == 'junior-fellow' );
   echo 'Junior Fellow'; 
else
   echo $userole; 
Skip to toolbar