Code

Updated logout to recognize htaccess option
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 11:40:51 +0000 (11:40 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 11:40:51 +0000 (11:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8171 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/logout.php

index c06a7866e1f5530d07fe632cbea311242fbe4b16..fef58fb1b9836a1ff4387c6842c9e021329a8175 100644 (file)
@@ -77,15 +77,16 @@ if (isset($_GET['request'])){
   @session_destroy ();
   
   /* If we're not using htaccess authentication, just redirect... */
-  if (!isset($config->data['MAIN']['HTACCESS_AUTH']) && !isset($_SERVER['REMOTE_USER'])){
-    header ("Location: index.php");
-    exit();
+  if (isset($config->data['MAIN']['HTACCESS_AUTH']) && preg_match('/^(true|yes)$/i', $config->data['MAIN']['HTACCESS_AUTH'])){
+
+    /* Else notice that the user has to close the browser... */
+    $smarty->display (get_template_path('headers.tpl'));
+    $smarty->display (get_template_path('logout-close.tpl'));
+    exit;
   }
 
-  /* Else notice that the user has to close the browser... */
-  $smarty->display (get_template_path('headers.tpl'));
-  $smarty->display (get_template_path('logout-close.tpl'));
-  exit;
+  header ("Location: index.php");
+  exit();
 
 }else{  // The logout wasn't forced, so the session is invalid