Get User Role from ID
I’m trying to add a column to bbPress 2.x that lists the last person to reply to a topic and adds a specific class to the
if that person is a moderator or keymaster. Unfortunately, I can’t find any documentation on the template tags in 2.x. So far, I’ve been able to get the user ID for the last reply, but I can’t seem to find the function that would get the role information for that user based on their ID.
Here’s the code that gets the ID:
$reply_author_id = bbp_get_reply_author_id( array( 'post_id' => bbp_get_topic_last_active_id() ) );
Now how can I get their bbPress role?
- You must be logged in to reply to this topic.