Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,881
- Creating & Extending
- 25,912
- Requests & Feedback
- 9,553
- Third Party Plugins
- 9,834
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,184
-
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;