BuddyDev

Search

One Click Spam Marker – Show for Editor role

  • Participant
    Level: Enlightened
    Posts: 24
    Darren Factor on #39035

    Hi

    Im using the One Click Spam Marker plugin. It only shows for Admin users. How can i make it so that Editors can also mark users as spammers.

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #39051

    Hi Darren,
    Thank you for uisng the plugin.

    At the moment the plugin does not have the ability to change it. We will update the plugin and put a filter in ur future release.

    Please do know that does not guarantee that BuddyPress will process a user a spammer when marked by non admins. I do no see any issue for now(as we will be using the function outside their capability check) but if they introduced the capability check in the specific method, It will break.

    Please check back next week for an update on this.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 24
    Darren Factor on #39061

    Thankyou Very much

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #39277

    Hi Darren,
    Thank you for the patience.

    Please upgrade to 1.1.2 and add the following code to your theme’s functions.php

    
    /**
     * Delegate mark spammer capability to editor.
     */
    add_filter( 'bp_ocms_can_moderate_users', function ( $can, $user_id ) {
    
    	if ( user_can( $user_id, 'edit_others_posts' ) ) {
    		$can = true;
    	}
    
    	return $can;
    }, 10, 2 );
    

    That will allow editors to mark users as spammer.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved