• Resolved bobjgarrett

    (@bobjgarrett)


    For some time I have been trying to pin down a problem reported by my members and failing as it did not seem repeatable. However, one member has just shown me how to do this.
    The problem is related to “Remember Me” not being ticked when logging in.
    If “Remember me” is ticked then all works fine.
    So problem is as follows:
    Open browser and web site, log in without ticking Remember Me. All the pages that should be viewable work without problems.
    Close the browser without logging out.
    Open the browser again, go to the web site. The login page says you are logged in but trying to view protect pages fails, though a couple of pages are actually shown but some buttons are missing (which is stranger).
    Cookies have not been set to delete on closing, and comparing the cookies when it is working and when it is not shows that the cookies simple_wp_membership… and swpm_session… are both present in both cases but the cookie wordpress_logged_in… is missing when access is not working.
    From this I wonder whether users should be completely logged out if the browser is closed but SWPM is making the system think they are still logged in.

    Any suggestions?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, do you have a cache plugin installed and running in your site or server?

    Also, the following is an explanation of how the Remember Me works.

    If the “Remember Me” box is checked, the login cookie used by the plugin is given an expiration date of 14 days and 12 hours.
    If the “Remember Me” box is not checked, the login cookie used by the plugin is given an expiration date of 3 days.
    If the member’s browser is configured to clear all cookies, when the browser is closed; the effect is as if the member is logged out, every time they close their browser; regardless of whether or not the “Remember Me” box is checked.
    Otherwise, the 14.5 or 3 day cookie expiration will be in force.

    Kind regards.

    • This reply was modified 2 years, 10 months ago by mbrsolution.
    Thread Starter bobjgarrett

    (@bobjgarrett)

    We had previously disabled the cache plugin and now also deleted the cache folders etc. I have also now tested the site using an external tool to check if there is any server caching and it reports not.
    But the problem still exists. The browser I am using to test does not clear all cookies, it is in its “standard” mode.
    Any other ideas?

    Thread Starter bobjgarrett

    (@bobjgarrett)

    A further thought, surely if the cookie wordpress_logged_in… is not present on the client then SWPM should see the user as not logged in rather than giving partial access?

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, you might like to try the following option.
    https://simple-membership-plugin.com/automatically-logout-members-browser-closure-force-member-logout/

    Let me know if the above information helps you.

    Regards.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    I have tried this and it works but it has the same effect for those who set “Remember me” which does not have the same problem.
    Is there a way to differentiate?

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    I have tried this and it works but it has the same effect for those who set “Remember me” which does not have the same problem.

    This issue might be related to their browser settings or browser cache. The best option is to add a message for your members to read when they log in.

    The message could say something like

    “Remember to log out after you have completed a session. If not the plugin will keep you logged in even if you have closed the browser. This might lead to other issues with other plugins. In that case the best solution is to clear the browser cache and then log back in.”

    Kind regards.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    It is strange though that I also use your plugin on another site which works correctly. I wonder why.
    However, it also seems strange that the plugin gives some access even though the cookie “wordpress_is_logged_in…” is not present. Could (Should?) this not be tested for as part of the code before providing access?

    • This reply was modified 2 years, 10 months ago by bobjgarrett.
    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    It is strange though that I also use your plugin on another site which works correctly. I wonder why.

    Are both sites running in the same server? Do both sites, run the same plugins and theme?

    Regards.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    They are running on different servers and do have different plugins but same theme.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Might a plugin that makes the Remember Me default to “on” work without causing a further problem?

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    They are running on different servers and do have different plugins but same theme.

    There might be a plugin conflicting with our plugin. Also what are the server specs? Are both server running the same PHP version?

    Regards.

    Thread Starter bobjgarrett

    (@bobjgarrett)

    I believe we have had this problem for some years (!) but only just discovered how it arises. Both servers are on the same PHP version though at times have been different I expect. So it may well be a plugin clash though it seems strange it only happens in this way.
    As I said it also seems strange that the plugin gives some access even though the cookie “wordpress_is_logged_in…” is not present. Could (Should?) this not be tested for as part of the code before providing access?

    Plugin Author wp.insider

    (@wpinsider-1)

    This looks like a site specific conflict with something (most likely due to a clash with another plugin or theme). It is worth doing the following test:
    https://simple-membership-plugin.com/forums/topic/test-for-plugin-and-theme-conflict-before-posting-an-issue-or-a-bug/

    Our plugin’s content access is given based on our plugin’s authentication. It won’t check WP cookie before giving content access. Our simple plugin works in a way that is appropriate for our simple plugin. There are a few other membership plugins which works based on the WP login cookie which maybe more appropriate for your site/project.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Login Problem without Remember Me’ is closed to new replies.