Bugs and other things

There is in fact a bug in the new WP-Members™ 2.7.1 release.  However, there is also something else that is not a bug but could generally be confused as one.  Hopefully, this post will clear up any confusion, help you get things fixed, and keep your site running smoothly! 

First, the non-bug:

The new version added some enhancements to prevent non-activated users from logging in via the back-end login.  Prior to 2.7.0, this wasn’t needed because the user did not have their password.  With the addition of the option of user chosen passwords at registration, we needed to add a check for the active flag as part of the user’s credentials.

Enter the non-bug.  All users are checked at login to see if they are activated.  Yes – admins, too.  So admins that are being “locked out” are most likely being prevented from logging in because their profile is not activated as far as the plugin is concerned.

The fix? Make sure all admins are activated profiles.  If you have several, you can just go to the Users > WP-Members™ menu item and activate them all at once.

(For those of you who may be wondering if you have inadvertently locked yourself out, this only effects users of the plugin who have multiple admins.  There has always been a feature that sets the admin who is setting the plugin option of moderated registration  as active so that they are not inadvertently locked out.  So, the primary admin should never be locked out.)

Now the bug:

There is a bug that I have found that causes a user to be deactivated if their profile is updated by an admin using the profile.php page (the WP admin backend).  This has been corrected and is now available as the 2.7.2 release.

Comments

  1. john says

    I am developing a website off-line using bitnami wordpress and have installed wp membera 2.7.2. I can log in but cannot find a link to register new members, except the wp back-end which does not deliver me to wp members log-in form. I also have the User Access Manager and User Role Editor plug-ins but if activated or not these do not seem to effect the ability to register. “Turn off registration” is not checked.

    Any suggestions would be appreciated.

    Thanks in advance,

    john b

  2. John Gaddis says

    I can’t login after an upgrade to 2.71… “User has not been activated.” ” … because their profile is not activated as far as the plugin is concerned.”

    I see: “The fix? Make sure all admins are activated profiles. If you have several, you can just go to the Users > WP-Members™ menu item and activate them all at once.”

    Where and how do I access if I can’t login via frontend? I do have access to all of the files on the server. Just a little lost at the moment. Help…

    Thanks in advance.

    • Chad says

      Hi John – I think for starters, you want to upgrade to the most current version, which is 2.7.3 (soon to be 2.7.4). But that may or may not fix things.

      If you have access to the database, you could add the active flag for your user directly. Essentially, this process would be knowing the primary key for your user (ID in wp_users). Then check the wp_usermeta table for meta values associated with that ID (field user_id). If there is no meta_key = ‘active’, you could add this entry with meta_value = 1. This would be the cleanest way.

      Alternatively, you could roll back to 2.7.0 and make sure your user account is activated, then re-upgrade.

      If you have trouble, contact me directly via the contact form.

      • John Gaddis says

        Thank you for the information. I was able to login via the frontend after accessing the database. Added the missing (meta_key with value= ‘active’) and meta_value longtext value= 1 to associated user.

        Also took the opportunity to run a upgrade to the most current version, (2.7.3) was running (2.7.2).

        Thank you again for an outstanding product.

  3. Bill says

    The non-admin user logs in and is taken to the admin page rather than the front end content. Did the latest version change something?

    • Chad says

      There would no known reason why that would occur in any of the plugin’s versions. However, it’s important to break this down into detail to make sure we are talking about logging in via the plugin or something/where else. Could you give some more detail or provide a link to an example page with some specifics?

      • Bill says

        I checked with a user and he said when he logged in, he went to the comments (front end) which is what I expected. However, went testing it, using his login credentials, it took me to the back end. Not the full admin functions, but as if I were going to update my profile.

        • Chad says

          So if I am reading this right, it sounds like if the user is not logged in, the comments section has a login link that the user is clicking? That link would be in the comments.php template in your theme and in most cases, if this exists, it is going to take the user to the wp-login.php page to login. See the WordPress Codex comment_form for information on changing the must_log_in parameter.

  4. Edwin says

    I’m using WP-Members 2.4.0 and I want to update it too 2.7.4 (yeah, I’m late…).

    But updating doesn’t work well for me: the users of my site are set to ‘not activated’, so after the upgrade they can’t log in. I was able to activate the admin, using the front panel – but then he logs out automatically and I’m not able to log in again. This time, however, the message is NOT ‘user not activated’, but ‘wrong username / password’.

    It took me a while to discover what went wrong, but when I checked the database (tables wp_users and wp_usermeta) I discovered that when I activate a user WP-members generates a new password. Since I have 1000+ members, that ‘s not what I want. What do I do wrong? Or better: how can I activate all users without making a new password for them?

    NB: I’m working on a development server, but I want to pretty sure about what to do before upgrading the live site.

    Thnx for your help!

  5. Edwin says

    I think I resolved the question I left a few hours ago: all the normal users are activated, so the only problems were the 4 admin I have on my site. I just did copy & paste of the user_pass from the ‘old’ wp_users (that I had saved to my local computer of course)to the new one (i.e. the one after ionstalling the new WP Members and activating the admins).

    Thnx!

    • Chad says

      Kudos to you for running this on a test server before upgrading the live site! If I could give gold stars to commenters, you’d get one!

      I not 100% sure your solution above will work, but if it does – great! I would ask, were you using user moderation before? If so, and the users were activated, you shouldn’t need to reactivate (although I haven’t tested an upgrade from 2.4 to 2.7.4). So let’s assume that everything worked and you’re ok with the main users and you just need to update the 4 admins – 1. you could just activate them. That will reset their password, but it will be sent to them via email (you don’t want to do that with 1000 users though). OR 2. you could add a database field directly to wp_usermeta. The usermeta table has four fields – “umeta_id” which is the primary key, so you wouldn’t set that, “user_id” which would be the ID from the user’s wp_user record, so you would set that accordingly, “meta_key” which would be “active”, and “meta_value” is 1 (which specifies they are activated).

      Hope that helps/makes sense.

      • Edwin says

        Thnx for your quick reply!

        Just to close this topic: you’re solution is in fact (and of course :-) the best.

        The 1000+ were already activated (only my admin and newly added test accounts were not – that was were the confusion started), so manually adding “active” = “1″ in the database to the few admins + test users is a good and practical solution.

        My suggestion works too (good to have learned how WP handles the passwords :-) but you have to ignore the automatically sent mail. Not very useful if the users are real clients/followers.

        Thnx!