Code

first part of the account expiration code
[gosa.git] / html / main.php
index 660cd712b111e5ca6406d1b42604cca797fb492c..35295c0cbed87bd585c7f8dcf4798ca2efbf2741 100644 (file)
@@ -342,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);
@@ -377,6 +389,7 @@ echo $display;
 $_SESSION['plist']= $plist;
 $_SESSION['config']= $config;
 
+
 /* Echo compilation time * /
 $r = split(" ",$start);
 $ms = $r[0];