From 7a4b68ccc0f6fa087bd96df47fe40f36eba84070 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 5 Jul 2010 12:31:26 +0000 Subject: [PATCH] Updated password expiration handling -Force user to change his password git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18928 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/index.php | 10 --- gosa-core/html/main.php | 14 ++-- gosa-core/ihtml/themes/default/framework.tpl | 73 +++++++++++++------- 3 files changed, 57 insertions(+), 40 deletions(-) diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index 02a4af1b4..f8743b060 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -371,16 +371,6 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces new log("security","login","",array(),"Account for user \"$username\" has expired") ; displayLogin(); exit(); - } elseif ($expired == 3){ - $plist= new pluglist($config, $ui); - foreach ($plist->dirlist as $key => $value){ - if (preg_match("/\bpassword\b/i",$value)){ - $plug=$key; - new log("security","login","",array(),"User \"$username\" password forced to change") ; - header ("Location: main.php?plug=$plug&reset=1"); - exit; - } - } } } diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index 3a47c061c..2f19db629 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -333,13 +333,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){ } /* check if we are using account expiration */ +$smarty->assign("hideMenus", FALSE); if ($config->get_cfg_value("handleExpiredAccounts") == "true"){ - $expired= ldap_expired_account($config, $ui->dn, $ui->username); - - if ($expired == 2){ - new log("security","gosa","",array(),"password for user \"$ui->username\" is about to expire") ; - msg_dialog::display(_("Password change"), _("Your password is about to expire, please change your password!"), INFO_DIALOG); - } + $expired= ldap_expired_account($config, $ui->dn, $ui->username); + if ($expired == 2){ + new log("security","gosa","",array(),"password for user \"$ui->username\" is about to expire") ; + msg_dialog::display(_("Password change"), _("Your password is about to expire, please change your password!"), INFO_DIALOG); + } elseif ($expired == 3){ + $smarty->assign("hideMenus", TRUE); + } } /* Load plugin */ diff --git a/gosa-core/ihtml/themes/default/framework.tpl b/gosa-core/ihtml/themes/default/framework.tpl index c02e26576..163f81a94 100644 --- a/gosa-core/ihtml/themes/default/framework.tpl +++ b/gosa-core/ihtml/themes/default/framework.tpl @@ -32,27 +32,52 @@ {t}GOsa main menu{/t} --> - - - - - - - - {if $channel != ""} - - {/if} -
- - - - -
- {$msg_dialogs} - {$contents} -
-
{$errors}{$focus} +{if !$hideMenus} + + + + + + + + + + + {if $channel != ""} + + {/if} +
+ + + + +
+ {$msg_dialogs} + {$contents} +
+
+ +{else} + + + + + +
+ +{/if} + +{$errors}{$focus} -- 2.30.2