• Resolved awesiome

    (@awesiome)


    Hey guys!

    I have been using this awesome plugin for a while and I noticed some kind of a bug. The plugin doesn’t seem to detect logged in users very well if they did not log in using the login page. So for instance if I logged in from the /wp-admin page or any other page and then I decide to go to the ‘My Business Account’ page which is restricted to certain members, I will be shown a log in message and asked to log in again.

    This is the same issue with log out. If you logout using the WordPress link in the header, you can still access the simple membership restricted page since you did not logout using the simple membership logout link. The log in issue isn’t that big a deal but the logout one is since it is a security issue.

    I am hoping this can be fixed in the next version of this awesome plugin.

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

    (@mbrsolution)

    Hi, are you trying to view protected content while logged in as an administrator in WordPress?

    Thread Starter awesiome

    (@awesiome)

    Yes I am

    Plugin Support mbrsolution

    (@mbrsolution)

    Please check the following documentation. Let me know if this helps you.

    Thank you

    Thread Starter awesiome

    (@awesiome)

    Hello,

    The documentation provides a very helpful plugin for easily adding already subscribed users as members. But that doesn’t solve the problem. But just to make sure, I went a head and deleted myself as a member from the simple membership menu, I then downloaded and installed the plugin. I imported myself as from the list of users to a membership level that has access to the content.

    After that I opened my browser in incognito, went to the restricted page and I was shown a login form. I opened a new tab with the website ‘My account’ page and logged in using the usual WordPress login form.

    I refreshed the first tab with restricted content and it showed me the content since I had just logged in. So I then logged out from the My Account tab using the WordPress logout link in the header. Upon returning to the restricted content page and refreshing, I was still able to view the content just fine. The black bar in the header did not show anymore since I had logged out of WordPress. But it seems perhaps simple membership uses a cookie to store if you are logged in and that cookie value doesn’t become invalid upon logging out using a WordPress link.

    I have tested this several times. I even logged out from the same page as the restricted content and refreshed the browser tab. The black WordPress bar no longer shows but the content is still accessible.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, the documentation I shared above is to allow an admin WordPress user access to protected content while logged in as an admin.

    Just to make things clear. You can’t log into WP Admin and then in the same browser log in as a member. It doesn’t work that way.

    If you want to test the member login functionality, then use a different browser where you are not also logged in as admin. Basically, create a scenario close to what your real users will face. Your real users are not going to be logged into your site as admin.

    Let me know if you need more help.

    Kind regards

    Thread Starter awesiome

    (@awesiome)

    I understand what you mean. I have tried the same thing with a subscriber role and I got the same result. Perhaps you could give it a try with a subscriber role on a page with restricted content and let me know your result.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, the following was quoted by one of the developers in another forum. I think this clarifies what you are experiencing.

    It is out intention to keep the login active for longer period. Majority of the users hate having to log in again and again.

    So if you are doing a project where you want to force logout users automatically and stuff, you will need to look for an alternative plugin as we can’t go down that route.

    Solution 2: 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.”

    Let me know if you need more information or help.

    Kind regards

    Thread Starter awesiome

    (@awesiome)

    I have added a custom logout button with the simple membership logout link so that users can use it to log out instead of using the WordPress logout link. That should solve the issue.

    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reporting back. That is a great idea. I am sure others will find your solution helpful.

    Enjoy the plugin ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Log in and log out bug’ is closed to new replies.