Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hook to limit which members can be made group admins


  • humbug123
    Participant

    @humbug123

    Hi,

    I want to prevent certain users being made group admins by existing group admins.

    I’m trying to find a suitable hook to use but would appreciate some pointers.

    The idea is is to hopefully find a filter that can intercept when an admin has tried to make a group member a group admin. My code can do the needed checks on member (no support needed for this) and then I can return whether to allow that member to be admin or block it.

    Thanks!

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

  • shanebp
    Moderator

    @shanebp

    Try this hook: do_action( 'groups_promote_member', $group_id, $user_id, $status );

    Found in: function groups_promote_member

    File: buddypress\bp-groups\bp-groups-functions.php


    humbug123
    Participant

    @humbug123

    I’ll check it out.

    Thanks for the quick reply – much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar