summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 83e41de)
raw | patch | inline | side by side (parent: 83e41de)
author | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 28 May 2006 15:37:19 +0000 (15:37 +0000) | ||
committer | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 28 May 2006 15:37:19 +0000 (15:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3527 594d385d-05f5-0310-b6e9-bd551577e9d8
html/index.php | patch | blob | history |
diff --git a/html/index.php b/html/index.php
index ece9138c5cc7fd7b518881d782280babedddb260..e799f3559ab63fa8c3970062a1eafd411856fde8 100644 (file)
--- a/html/index.php
+++ b/html/index.php
$config->make_idepartments();
$_SESSION['config']= $config;
- /* Go to main page */
- gosa_log ("User \"$username\" logged in successfully");
- header ("Location: main.php?global_check=1");
- exit;
+ /* are we using accountexpiration */
+ if((isset($config->data['MAIN']['ACCOUNTEXPIRED'])) && $config->data['MAIN']['ACCOUNTEXPIRED'] == "1"){
+
+ $expired= ldap_expired_account($config, $ui->dn, $ui->username);
+
+ if ($expired == 1){
+ $message= _("Account Locked");
+ $smarty->assign ('nextfield', 'password');
+ gosa_log ("Account for user \"$username\" has expired");
+ } elseif ($expired == 3){
+ $plist= new pluglist($config, $ui);
+ foreach ($plist->dirlist as $key => $value){
+ if (preg_match("/\bpassword\b/i",$value)){
+ $plug=$key;
+ gosa_log ("User \"$username\" password forced to change");
+ header ("Location: main.php?plug=$plug&reset=1");
+ exit;
+ }
+ }
+ }
+
+ /* Not account expired or password forced change go to main page */
+ gosa_log ("User \"$username\" logged in successfully");
+ header ("Location: main.php?global_check=1");
+ exit;
+
+ } else {
+ /* Go to main page */
+ gosa_log ("User \"$username\" logged in successfully");
+ header ("Location: main.php?global_check=1");
+ exit;
+ }
}
}
}