This topic is locked

Automatically logout a user after certain amount of time

9/12/2018 12:40:51 PM
PHPRunner General questions
N
notuo author

Hi.
I have a form to fill by the user. I recommend to fill that in less than 30 minutes for example. What I need is to logout the user completely after those 30 minutes if they didn't finished nor click the SAVE button.
Maybe also send a warning , let's say 5 minutes before this logout.
Any idea on how to do this?
Thanks in advance for any tips,

admin 9/12/2018

There are several ways to do that. Here are some pointers:

https://stackoverflow.com/a/51323034/10969
You will also need to display some warning and a countdown 25 minutes after page was loaded.
Here is an example of Javascript countdown timer:

https://www.w3schools.com/howto/howto_js_countdown.asp
You will need, of course, modify this code to integrate it into your page.