logout idle fix (moved to constants)
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / logout_idle.inc
index 8b5abb42bfafd3625265983ec2c14e9b1974b943..70955efb6ad9136661d5bcfa8a159c12a1637c59 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.130387 seconds and 4 git commands to generate.