X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Flogout_idle.inc;h=783c93447665f1dbd971bd7bbef1e0a5d6f9e89e;hb=31e42c198e6e5835e3bcf70a5f44c9820af116b7;hp=8b5abb42bfafd3625265983ec2c14e9b1974b943;hpb=f046f788e8ba60e21b575c89d72cbf91c5210e23;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/logout_idle.inc b/wwwroot/inc/logout_idle.inc index 8b5abb4..783c934 100644 --- a/wwwroot/inc/logout_idle.inc +++ b/wwwroot/inc/logout_idle.inc @@ -1,7 +1,13 @@ = (time() - 60*60)) { //TODO predelat timeout do konstanty v nastaveni + +// Logout user, if idle for more then LOGOUT_IDLE_SEC seconds + +if (( !isset($_SESSION['last_request'] )) || + ( $_SESSION['last_request'] >= (time() - LOGOUT_IDLE_SEC))) { $_SESSION['last_request'] = time(); } else { require_once(INCLUDE_DIR."eventz/logout.inc"); logout(); } + +?>