Automatic Timer Logout (1 hour)

GageDodd

Member
Sep 30, 2014
225
57
Before I Start 100% CREDITS TO @Mythic this was found under a help section request.

if you want to make users logout every 1 hour, you have to set a session lifetime. This is based on your homepage.
Right ABOVE session_start(); in your core file, add following
PHP:
// server should keep session data for AT LEAST 1 hour
ini_set('session.gc_maxlifetime', 3600);

// each client should remember their session id for EXACTLY 1 hour
session_set_cookie_params(3600);

Again, i did not make this what so ever was all made by mythic, thanks
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
This is implying my users will go to the web and not just idle on the client all night.

It's only a relatively decent release if the intention is to log them out of the website, and not the client.
 

Jerry

not rly active lol
Jul 8, 2013
1,957
522
It's a good release, but it gets annoying when you're active on the client and your session gets expired for not being on the website. A solution to that is creating an AJAX request to the website every X amount of minutes to keep the website session active.
 

Users who are viewing this thread

Top