WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: New User Approve] How do I make it so a user with Editor Permission can Approve Users?

[Resolved] [Plugin: New User Approve] How do I make it so a user with Editor Permission can Approve Users?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Josh Harrison
    Member

    @picklewagon

    This can be done by adding the following to your theme:

    function twentyeleven_nuacap( $cap ) {
    return ‘edit_posts’;
    }
    add_filter( ‘new_user_approve_minimum_cap’, ‘twentyeleven_nuacap’ );

    Simply return the capability you require the approver to have. http://codex.wordpress.org/Roles_and_Capabilities

    davemac
    Participant

    @davemac

    The above doesnt seem to work? Shouldn’t it be return ‘edit_users’; ?

    davemac
    Participant

    @davemac

    This worked for me:

    function hipo_add_extras(){
    	$editor = get_role( 'editor' );
    	$editor->add_cap( 'list_users' );
    	$editor->add_cap( 'edit_users' );
    	$editor->add_cap( 'new_user_approve_minimum_cap' );
    }
    add_action('admin_init','hipo_add_extras');

    The first solution worked fine for me.

    The second one did not.

    pxforti
    Member

    @pxforti

    This worked for me too:

    function hipo_add_extras(){
    	$editor = get_role( 'editor' );
    	$editor->add_cap( 'list_users' );
    	$editor->add_cap( 'edit_users' );
    	$editor->add_cap( 'new_user_approve_minimum_cap' );
    }
    add_action('admin_init','hipo_add_extras');

    AWESOME!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: New User Approve] How do I make it so a user with Editor Permission can Approve Users?’ is closed to new replies.