typo fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / logout_idle.inc
index 8b5abb42bfafd3625265983ec2c14e9b1974b943..783c93447665f1dbd971bd7bbef1e0a5d6f9e89e 100644 (file)
@@ -1,7 +1,13 @@
 <?php
-if(!isset($_SESSION['last_request']) || $_SESSION['last_request'] >= (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();
 }
+
+?>
This page took 0.121074 seconds and 4 git commands to generate.