WordPress.org

Ready to get started?Download WordPress

Forums

New User Approve
[resolved] How do I make it so a user with Editor Permission can Approve Users? (6 posts)

  1. Jason
    Member
    Posted 2 years ago #

    Does anyone know how to make it so the Editor can approve users?

    I've tried using Menu Editor Plugin and Capabilities Manager and they don't do it. I need my client to be able to approve new users. The client has editor permissions.

    Any help would be great.

    http://wordpress.org/extend/plugins/new-user-approve/

  2. Josh Harrison
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. davemac
    Member
    Posted 1 year ago #

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

  4. davemac
    Member
    Posted 1 year ago #

    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');
  5. Chris Montgomery
    Member
    Posted 1 year ago #

    The first solution worked fine for me.

    The second one did not.

  6. pxforti
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic