Users forced to log out to log in

Symptom:
User is logged in, then closes page on device without logging out
User returns some time later and is only given option to log out, then can log in.

Expected:
user closed device, wp closes session after time out, user returns and only sees LOG IN option

Anyone know why this behavior is happening and how do I achieve Expected above?
Thanks for any help and wisdom.
F5

Closing a browser does not log the user out. What you have experienced is how WordPress works. It’s nothing to do with s2Member.

What you could do is use JavaScript to detect a lack of activity, and then log the user out automatically once a set period of time has been reached. Beware, though: it’s possible you could cause someone who’s still logged in and just viewing the same page to be logged out.

If you’re happy that that is unlikely to occur, then the easiest thing to do is use this plugin: https://wordpress.org/plugins/inactive-logout/ (or another one like it).

1 Like

Thanks for your help and advice, much appreciated, wp is a bit new to me .

1 Like