WP-Members™ 2.6 bug fix – You do not have sufficient permissions to access this page

In WP-Members™ 2.6, some changes were made to the way that the plugin references itself for the WP admin menu structure.  There were two small places that a necessary change was omitted.  

If you click on “Settings” on the plugin admin page, you will receive a message “You do not have sufficient permissions to access this page.”  You can still access the settings for the plugin from the WP admin menu.  On the left sidebar menu in the WP admin, click on Settings > WP-Members to get to the settings.

Similarly, in the Users > WP-Members menu, the top menu that allows you to change the list from all users, users not exported, users not activated, etc, will give you the same “You do not have sufficient permissions to access this page” message.  This does not eliminate your ability to access the functions such as activating users.  Users can still be activated an exported; it simply doesn’t allow you to change the list of users displayed based on certain criteria.

A fix for this will be included in what will become WP-Members™ 2.6.1 which will be primarily a bug fix release.  At this time, I am not rushing this bug fix release out the door because this particular bug is simply an annoyance, rather than something that shuts down the plugin.

In the meantime, if you would like to apply the fix for these bugs, both of them are simple changes to wp-members-admin.php.

The first change for the settings link is found at line 28.  The page parameter of wp-members.php needs to be changed to wpmem-settings.

Change the line from this:

$settings_link = '<a href="options-general.php?page=wp-members.php">' . __('Settings') . '</a>';

To this:

$settings_link = '<a href="options-general.php?page=wpmem-settings">' . __('Settings') . '</a>';

For the bulk user management screen, the change is in the same wp-members-admin.php file at line 837 (that’s a long way down there, so if you don’t have an editing tool that gives line numbers, just do a search for code as shown below)

Similar to the first change, we are changing the page parameter from wp-members-admin.php, to wpmem-users.

Change the line from this:

$link = "users.php?page=wp-members.php";

To this:

$link = "users.php?page=wpmem-users";

As I mentioned, these fixes will be included in the bug fix release.


  1. says

    I have the same “.. dont have permissions ..” response when I try to acces the admin panel.

    I installed wp-members, set up a registration page, as soon as I put in the url to the registration page on in the settings and hit update I received the message. Now it treats me as a member and not an admin. I cannot do anything on my site.

    • says

      Dale – could you be more specific on *exactly* what you did, because what you described is not possible.

      First, the bug that this is describing had nothing to do with locking out of the site. It was when you clicked the “settings” link in the plugin admin panel as opposed to using the sidebar menu. This was corrected in 2.6.1 (which was several versions ago).

      Second, WP-Members does not do anything to change a users status. When you register using the WP-Members form on the front end of the site, it registers the user using the default role. But if you create a user using WP on the backend (WP-Members does not have a backend process for creating users, since that exists already in WP), you can set the role. There is no other process for setting role between WP and the plugin. The point is, the plugin (and WP, BTW) is designed so that you don’t ever accidentally change your own admin role to something lower.

      If you registered to test the forms and logged in as that user, then what you need to do is log out from the user account so you can log back in as an admin. If that’s not the case, I need a better description of your problem.

  2. says

    I did two things. I added the registration URl to the settings and I went to the edit user profile form to test it by updating my admin profile. I added my name and other fields. I can login now under admin but my access is limited to a subscriber. I cannot not access the dashboard menu other than topics and replies. This is a new install of wordpress and wp-members.

    • says

      I have to be honest Dale – I really don’t know what’s gone wrong for you. There really isn’t a way for you to change your own user role.

      The only time WP-Members does anything with the user role is to set a new registration to the default role when that new user is created on the front end WP-Members registration form. Further, on the back end, WP does not allow you to change your own role (whether admin or otherwise). For example, if your admin username is adminuser, when logged in as adminuser you cannot change the role for that account. The role can only be changed by logging in another account that has admin privileges and changing the role of adminuser from the other account. This is true whether you have WP-Members installed or not.

      Is this site running any plugins that have anything to do with user roles? And are you certain you are logged in with your administrator account?

  3. says

    I was able to fix it with a solution from the wp forums, by temporarily putting

    $user = new WP_User(”,’admin’);

    Into my theme’s funcions.php via FTP. Then loaded a page to run it. I now have admin privileges again. When I get time I will try to reproduce the error now that I think I have a solution. It seems my role changed when I updated my profile in the wp-member user profile form.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>