From 10768c91ce14b16b68b6f46dae4e0668b2d6448e Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 Jul 2010 06:33:45 +0000 Subject: [PATCH] Updated class password to handle expired accounts. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18936 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/plugins/personal/password/class_password.inc | 3 +++ gosa-core/plugins/personal/password/nochange.tpl | 6 ------ gosa-core/plugins/personal/password/password.tpl | 7 ++++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gosa-core/plugins/personal/password/class_password.inc b/gosa-core/plugins/personal/password/class_password.inc index d3a67be21..7006dc777 100644 --- a/gosa-core/plugins/personal/password/class_password.inc +++ b/gosa-core/plugins/personal/password/class_password.inc @@ -82,6 +82,9 @@ class password extends plugin $smarty->assign("proposalEnabled" , $this->proposalEnabled); $smarty->assign("proposalSelected" , $this->proposalSelected); + $smarty->assign("passwordExpired", ldap_expired_account($this->config, $ui->dn, $ui->uid) & POSIX_FORCE_PASSWORD_CHANGE); + + if(isset($_POST['proposalSelected'])) $this->proposalSelected = get_post('proposalSelected') == 1; diff --git a/gosa-core/plugins/personal/password/nochange.tpl b/gosa-core/plugins/personal/password/nochange.tpl index 0f175c647..37d97f592 100644 --- a/gosa-core/plugins/personal/password/nochange.tpl +++ b/gosa-core/plugins/personal/password/nochange.tpl @@ -1,11 +1,5 @@ -
- {t}Password change not allowed{/t}> -
-

{t}You have no permission to change your password at this time{/t}

-
- diff --git a/gosa-core/plugins/personal/password/password.tpl b/gosa-core/plugins/personal/password/password.tpl index ab93bc83f..5debdd8b6 100644 --- a/gosa-core/plugins/personal/password/password.tpl +++ b/gosa-core/plugins/personal/password/password.tpl @@ -10,6 +10,11 @@
+{if $passwordExpired} + {t}Your Password has expired. Please choose a new password.{/t} +
+{/if} + {if !$proposalEnabled} @@ -79,8 +84,8 @@
-{/if} +{/if}
-- 2.30.2