diff --git a/html/main.php b/html/main.php
index 6fefa08a2fadc0fa664a4c1939bc291564a003b0..35295c0cbed87bd585c7f8dcf4798ca2efbf2741 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Load department list when plugin has changed. That is some kind of
compromise between speed and beeing up to date */
if (isset($_GET['reset'])){
- if (!isset($_SESSION['cached_departments'])){
- $config->get_departments();
- $_SESSION['cached_departments']= $config->departments;
- } else {
- $config->departments= $_SESSION['cached_departments'];
- }
- $config->make_idepartments ();
if (isset($_SESSION['objectinfo'])){
unset ($_SESSION['objectinfo']);
}
/* 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);
@@ -380,8 +385,10 @@ if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->d
/* Show page... */
echo $display;
-/* Save plist */
+/* Save plist and config */
$_SESSION['plist']= $plist;
+$_SESSION['config']= $config;
+
/* Echo compilation time * /
$r = split(" ",$start);