BuddyDev

Search

[Resolved] BuddyPress Moderation

  • Participant
    Level: Initiated
    Posts: 1
    Jean-Frederic on #47827

    Dear,

    In BuddyPress Moderation.
    Is there a way to report admin groups?

    It looks like everytime I want to report a “group” I get a “It cannot be reported”.
    I’m admin, or I have other users with admin roles… and same thing for them.

    The “BuddyPress Group” in General Settings is activated… and no “Whitelisted Roles” set.

    From what I’ve seen in other discussions, it looks like Admin is by default whitelisted. But No admin roles whitelisted.

    Can we overcome this and do have admin elements to be reported by others?

    Thanks,

    Jean-Frederic

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #47836

    Hi Jean,
    Welcome to BuddyDev.
    We do not disallow admin from reporting a group.

    Yes, admin user is whitelisted. If you want to avoid that, you can certainly do it.

    Please put the following code in your bp-custom.php

    
    
    add_filter( 'bpmts_is_user_whitelisted', function ( $is, $user_id ) {
    	return bpmts_user_has_roles_in( $user_id, bpmts_get_option( 'whitelisted_roles', array() ) );
    }, 10, 2 );
    
    

    Now, it only uses roles for comparison and does not skip the super admin users by default.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    Jean-Frederic on #47839

    It worked!
    Thanks a lot!

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #47840

    You are welcome.

The topic ‘ [Resolved] BuddyPress Moderation’ is closed to new replies.

This topic is: resolved