Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Know if a user is a group admin

  • Avatar of José Conti
    Jose Conti
    Participant

    @jconti

    Hi,

    I need to know (for my plugin) if a user is a Group Admin and, if he is a group admin, of which one he is.

    Does someone know how to do that?

    I need to get this information from WordPress administration.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Rocio Valdivia
    Rocio Valdivia
    Participant

    @_dorsvenabili

    Hi again! I’ve just answer you by twitter, but I’ll write down here because it can be usefull for other people ;)

    You can use the functions:

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

    or these ones aswell:

    BP_Groups_Member::get_is_mod_of( $user_id );
    BP_Groups_Member::get_is_admin_of( $user_id );

    Hope it helps!

    Avatar of José Conti
    Jose Conti
    Participant

    @jconti

    Thanks a lot @_dorsvenabili
    ;-)

    Avatar of Rocio Valdivia
    Rocio Valdivia
    Participant

    @_dorsvenabili

    Mark it as Resolved if it worked ;)

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.