X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Flogout_idle.inc;h=70955efb6ad9136661d5bcfa8a159c12a1637c59;hb=24634046428a423bcb371af50523d82bfb3c3a92;hp=8b5abb42bfafd3625265983ec2c14e9b1974b943;hpb=de8e1dde86dc65e8afcb8f569bbbebd8d7259468;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/logout_idle.inc b/wwwroot/inc/logout_idle.inc index 8b5abb4..70955ef 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(); } + +?>