• Hi,
    I love your plugin, but is there any way you could add an option so other roles can access it?
    I’d like to have a membership editor role, that just adds and edits users. They would need access to this plugin, but no other plugins.
    If you would consider adding this capability I would be very grateful.

    Thanks in advance,
    Jim

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am looking for the same thing, I am on a multisite install and only the super admin can change usernames.

    There is a bug in the plugin where the user role is checked.

    File: /username-changer/includes/misc-functions.phpmisc-functions.php
    Line: 50
    CURRENT CODE:in_array( $user_role, $allowed_roles, true )
    FIX: array_key_exists( $role_name, $allowed_roles )

    @natebald @aurpo

    As @georgyvk mentioned, there is indeed a bug. If you’re not keen on hard-coding changes, there are also filters set up that you can hook into. I wanted all users to be able to change their password, and due to the bug mentioned above, added the following filter to my child theme’s functions.php (allowing for changes to stick if plugin updates)

    function editor_change_username($allowed){
            //could add role or capability checks here
            return true;
    }
    add_filter('username_changer_can_change_own_username', 'editor_change_username');
    • This reply was modified 3 years, 9 months ago by shadowq.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add option to change capability / role access’ is closed to new replies.