Change WordPress user roles and capabilities Forums How to or FAQ Create a user/role that can only add/edit users

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3474
    pazazta
    Participant

    Hey,
    How can I create a user/role in multisite (maybe super admin) that can only add/edit users?
    The user/role need to have access to all subsites but he can only add/edit users.
    Thanks

    #3477
    Vladimir
    Keymaster

    Hi,

    1) network activate URE;
    2) turn ON ‘Allow non super administrators to create, edit, and delete users’ option at ‘Network admin->Settings->User Role Editor->Multisite’ tab;
    3) create new role, e.g. user_manager, at the main site via ‘Network Admin->Users->User Role Editor’;
    4) add to it these capabilities: read, list_users, create_users, edit_users, delete users, promote_users, remove_users.
    5) click ‘Update Network’ button to replicate this role to all subsites of your network.
    6) assign this role to a user via ‘Network Admin->Users’: click ‘Capabilities’ under selected user row.
    7) add this user with permissions granted together to all subsites of a network – click ‘Update Network’.

    You need to repeat the replication steps (Update Network) for role and user after a new subsites was added.

    #3479
    pazazta
    Participant

    Thank you!
    Is there any API or PHP function for the replication? “Update Network” or “Update all sites”?

    #3483
    Vladimir
    Keymaster

    There is no public API or PHP function currently.
    If you wish to build it yourself you can start from URE_Lib::wp_api_network_roles_update(), located at includes/classes/ure-lib.php.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.