WordPress manage users as non admin

Is it possible to let a non-admin user (e.g an editor / author or another role) manage the users? I am working on a WordPress website where multiple people manage the website, and there will be someone who must be able to manage the users, but does not need access to all the admin features.

Thanks.

Related posts

Leave a Reply

3 comments

  1. First off, there is no generic “manage users” ability. There are several individual abilities under that rubric. See http://codex.wordpress.org/Roles_and_Capabilities

    Anyway, you have a couple options.

    1. You can add certain capabilities to existing users or
    2. you can create a new custom role with the capabilities you need.

    If a brand new role is needed, one can be created using add_role() and add_cap():

    $role = add_role('foo_doer', 'Foo Doer');
    
    $role->add_cap('do_foo');
    
    $role->add_cap('do_bar');
    

    If you want to manipulate a user specifically:

    // get user by user ID
    $user = new WP_User( $id );
    
    // or get user by username
    $user = new WP_User( null, $name )
    

    then

    // add $cap capability to this role object
    $role_object->add_cap( $capability_name );
    

    That’s the basics. A full and elegant rundown is here: http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/

  2. Yes, that is possible.

    For a user to be able to see the list of other users in wp-admin, he or she needs the capability list_users, to be able to edit existing profiles, he or she needs edit_users, to add new ones add_users and to delete old ones delete_users.

    For managing a site with multiple specific user roles that need to have certain capabilities and not to have others, I highly recommend using a mixture of two plugins:

    Adminimize gives you control over what part of the admin interface is shown to what role

    Members lets you edit the capabilities of a specific role and add new roles as needed

  3. Yes, this is very possible and quite simple.

    You will want to use the RoleScoper plugin to enable extra permissions for the “Editor” role or even create an entirely new Role to manage users. It’s a very easy plugin to use and well-documented on its web site.