Code

Moved from "1" to "true"
[gosa.git] / html / main.php
index 95b5e5ca9196ca65f5eb17d7263f8acabb5f7b8c..35295c0cbed87bd585c7f8dcf4798ca2efbf2741 100644 (file)
@@ -240,8 +240,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
 /* Load department list when plugin has changed. That is some kind of
    compromise between speed and beeing up to date */
 if (isset($_GET['reset'])){
-  $config->get_departments();
-  $config->make_idepartments ();
   if (isset($_SESSION['objectinfo'])){
     unset ($_SESSION['objectinfo']);
   }
@@ -344,6 +342,18 @@ if (is_file("$plugin_dir/main.inc")){
 
 /* Close div/tables */
 
+  /* check if we are using account expiration */
+
+  if((isset($config->data['MAIN']['ACCOUNTEXPIRED'])) && $config->data['MAIN']['ACCOUNTEXPIRED'] == "1"){
+    
+      $expired= ldap_expired_account($config, $ui->dn, $ui->username);
+
+      if ($expired == 2){
+        gosa_log ("password for user \"$ui->username\" is about to expire");
+        print_red(_("Your password is about to expire, please change your password"));
+      }
+  }
+  
 /* Print_out last ErrorMessage repeated string.
  */
 print_red(NULL);
@@ -379,6 +389,7 @@ echo $display;
 $_SESSION['plist']= $plist;
 $_SESSION['config']= $config;
 
+
 /* Echo compilation time * /
 $r = split(" ",$start);
 $ms = $r[0];