Code

Added automatic logout when session is expired
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 14:24:46 +0000 (14:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 14:24:46 +0000 (14:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18557 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/main.php
gosa-core/ihtml/themes/default/framework.tpl

index be20d4ce12a600d9417bac321d8b771b1ddcc05e..c78b9d841beb596d74d1a8403bd5c713918faf8b 100644 (file)
@@ -360,6 +360,7 @@ if (is_file("$plugin_dir/main.inc")){
 $smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
 $smarty->assign ("pathMenu", $plist->genPathMenu());
 $smarty->assign("contents", $display);
+$smarty->assign("sessionLifetime", $config->get_cfg_value('core','sessionLifetime'));
 
 /* If there's some post, take a look if everything is there... */
 if (isset($_POST) && count($_POST)){
index d5dec1057654a5194c06eb9e02230be604958856..0bf462501c624c1a1cb1aaa8ab26de7ed0e145b5 100644 (file)
    {$focus}
    <input type="hidden" name="php_c_check" value="1">
   </form>
+
+  <!-- Automatic logout when session is expired -->
+  <script type='text/javascript'>
+   function logout()
+   {
+    document.location = 'logout.php';
+   }
+   logout.delay({$sessionLifetime});
+  </script>     
  </body>
 </html>