• Resolved iananderson

    (@iananderson)


    Hi
    I have a user role with all the “Users” capabilities turned on (edit, delete, add etc).
    But I can only view the users in the backend – I can’t edit them. When I try and access the edit page directly, it says “Sorry, you are not allowed to edit this user.”
    How can I allow a non-admin user role to edit users?
    I even tried adding the capability to my functions.php file using:

    function edit_give_manager() {
        // Get custom role
        $give_manager = get_role('give_manager');
        $give_manager->add_cap('edit_users');
    }
    add_action( 'init', 'edit_give_manager' );

    But that didn’t work either.
    Appreciate your help,
    Thanks
    Ian

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kevin Behrens

    (@kevinb)

    @iananderson Go to the Capabilities screen. After loading your role, scroll to the bottom and set the “Role Level” dropdown equal to the highest role that should be editable.

    This requirement is applied because there may be a need to stop Editors from editing Administrators, etc.

    Thread Starter iananderson

    (@iananderson)

    Thanks @kevinb

    I’ve changed the “Role Level” of the user role to “10” which is the highest. However when I login to the dashboard with the user role, I still can’t edit other users. I can only edit myself.

    I have checked all the “Users” boxes under “Editing Capabilities”, “Deletion Capabilities” and “Reading”, and I have checked “edit users”, “create users”, “delete users”, “promote users”, “list users” and “remove users”.

    Is there something else?

    Thanks

    Ian

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t edit Users’ is closed to new replies.