Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Detecting if user is Moderator and other template tags


Boone Gorges
Keymaster

@boonebgorges

`groups_is_user_mod( $user_id, $group_id )`
`groups_is_user_admin( $user_id, $group_id )`

Check out their definitions in bp-groups.php. They check whether the user is a mod/admin of a particular group.

But that won’t work all that well on a profile page, because a user could be a member of a number of groups, so you won’t have a specific group_id to feed into the function. In what circumstances will the Moderator button appear? If they’re a moderator of *any* groups?

Skip to toolbar