Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group Moderator broken?


  • majecdad
    Participant

    @majecdad

    Whenever something doesn’t work, I usually blame my setup first. I find that’s helpful and it forces me to try all the angles to make sure it’s not me.

    Having said that, in this case, I have tried off and on for two months to figure out why Group Moderators is broken. The only way I can get a Group Moderator to be able to remove others’ content in that group is by a) promoting them to Admin (no bueno) or adding extra capabilities (like delete users) to their Role (also no bueno).

    I have tried this with NO other plugins active except BuddyPress and bbpress, and on three different themes (including 2015). Finally, I tried it on a completely different site, again with only bbpress and BP, and still no joy.

    I thought maybe I was looking at it wrong… but I confirmed in codex:

    “Moderators: When a group member is promoted to be a moderator of the group, it means that the member receives the following additional abilities:
    Edit, close, and delete any forum topic or post in the group
    Edit and delete other kinds of content, as produced by certain plugins”

    What is interesting is that the Moderator role as set in bbpress WORKS for that user in that Group’s Group Forums. But the moderator user can NOT delete any BuddyPress posted content in that group, no matter what role or capabilities I assign (short of those of Administrator).

    So, I ask, am I looking at this wrong? What am I missing? Shouldn’t a User promoted to Group Moderator be able to moderate content in that Group, regardless of their WP Role and capabilities?

    Thanks.

    WP 4.1.1
    BP 2.2.2

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

  • danbp
    Moderator

    @danbp

    Shouldn’t a User promoted to Group Moderator be able to moderate content in that Group, regardless of their WP Role and capabilities?

    Sounds logic, but No. See documentation in bp-core/bp-core-caps.php for the “why”. 😉

    Since BP 1.6, group moderators can only delete, move, spam group forum content.

    External reference.


    shanebp
    Moderator

    @shanebp

    afaik, even site admins and groups admins cannot edit activity stream items on the front-end.
    This will give group moderators the ability to delete activity stream items:

    function majecdad_group_mod_delete( $can_delete, $activity ) {
    	
       if( $activity->component == 'groups' ) {
    	
    	$group_id = $activity->item_id; 
    		
    	if( bp_current_user_can( 'bp_moderate' ) || groups_is_user_mod( bp_loggedin_user_id(), $group_id ) )
    	    $can_delete = true;
    	
       }
    
       return $can_delete;
    }
    add_filter('bp_activity_user_can_delete', 'majecdad_group_mod_delete', 21, 2 );

    majecdad
    Participant

    @majecdad

    This.

    This is what is so great about the BP community.

    So while I didn’t fully understand the ‘why’ laid out in @danbp reference to bpcore, I appreciate his reply and direction to something. Still, I think the ‘logic’ of providing mods the specific group moderation capability should apply, but that’s ok, it’s above my paygrade 🙂 and besides…

    Major props and huge thanks to @shanebp – that code worked perfect. I can’t tell you how much I appreciate it. I know the BP community is volunteer, and folks get to stuff as they can out of the spirit of the open-source community – so thanks.

    Regardless, I also tracked you down at philopress and I’m going to figure out something to buy there just to support your efforts.

    Thanks all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Group Moderator broken?’ is closed to new replies.
Skip to toolbar