Only Network Admin sees "Add New Users" option

Wordpress 3.1 in MU mode
Module v 1.0.6

Plugin appears to install without problem, but the "Add New Users" option can only be seen and used by Network Administrators. This is the case whether it's Network activated or activated on the specific blog where it would be really helpful.

Problem is that the people who need to use are Administrators for that blog only. They can create and edit users the normal way.

Wondering with the 1.0.6 enhancement "allow admin page access to all users who have edit_users
capability" might be relevant. Is there a setting somewhere that I have missed?

  • DavidM

    Hello kuroi and welcome to WPMU DEV!

    You can definitely get the plugin to show for your site admins if you simply navigate to your Network Admin page under Settings > Settings, you should see the following option:

    Allow site administrators to add new users to their site via the "Users > Add New" page.

    Simply ensure that's checked and your site admins should see the option in their Users menu. Let me know if you have any other questions or concerns on that!

    Cheers,
    David

  • kuroi

    Hi David

    I didn't know about this switch, so thank you. But alas when I went there it was already checked.

    Even more spooky ... when I uncheck it and save, it doesn't appear appear to make any difference. Site admins still have the default three user options ("Users", "Add New" and "Your Profile"), which I guess points to a deeper underlying problem.

    The site was imported from a non-MU install of WP. So I'm suspecting that there might be something a bit off in that, rather than this plugin (though any ideas about where to look would be very gratefully accepted).

  • DavidM

    Alright, I went digging further into it since you were still having the same trouble with it. I then realized that the menu only displayed for Super Admin and not for Site Admins. So, I dug into the code and found a quick fix.

    On line 142 of add_new_users.php you'll see the following:
    add_submenu_page( 'users.php', 'Add New Users', 'Add New Users', 'edit_users', 'add-new-users', array( &$this, 'page_output' ) );

    You can change that line to the following:
    add_submenu_page( 'users.php', 'Add New Users', 'Add New Users', 'add_users', 'add-new-users', array( &$this, 'page_output' ) );

    And that should work without a problem. Would you mind giving that a try?

    Frankly, I can't see why edit_users would be a problem at all since that's an administrative capability itself, just like add_users. But the fix did work for myself and hopefully you'll have no trouble with it.

  • kuroi

    Way to go David. That works perfectly for me.

    I'm hypothesising (OK, guessing) that the reason it wasn't working was because site admins don't have "edit_users" capability (only network admins do).

    I'm further hypothesising / guessing that this is deliberate, as for hosted networks the capability would allow the site admin on one blog to change user details on blogs they don't own - so this is restricted to network admins and the users themselves.

  • alexdepena

    Hello,

    I found this topic after entering a similar topic.

    It appears to me that the current add-new-user plugin is a broken toy. It does not, as advertized "Works perfectly with WordPress 3.1.2, WordPress Multisite 3.1.2 and BuddyPress 1.2.8"

    Is there any reason why the fix suggested by DavidM has not been included with the plugin now being distributed. Does this situation point out a bug somewhere else in 3.1.2?

    This kind of thing gives one pause before relying on an automatic update.

  • DavidM

    Hi everyone,

    The plugin's been updated to resolve avoid requiring the aforementioned workaround.
    https://premium.wpmudev.org/project/add-new-users

    @kuroi, I believe you're right, and thanks for your thoughts on that.

    @alexdepena, the developer's updated your prior thread on the matter too. Thanks for your feedback, your thread helped to bring the matter up again for review.

    Cheers,
    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.