From 3826237bad6e61e48c1b06ed5a23fe6b66fd72b6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 14 Jan 2009 13:41:14 +0000 Subject: [PATCH] Updated Samba tab -Fixed password info git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13349 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../samba/personal/samba/class_sambaAccount.inc | 12 +++--------- gosa-plugins/samba/personal/samba/samba3.tpl | 9 +++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index 83cfce312..56ebe58d9 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -694,13 +694,11 @@ class sambaAccount extends plugin /* Create additional info for sambaKickOffTime and sambaPwdMustChange. e.g. Display effective kickoff time. Domain policy + user settings. */ - $additional_info_KickoffTime = ""; $additional_info_PwdMustChange = ""; /* Calculate effective max Password Age This can only be calculated if sambaPwdLastSet ist set. */ - $this->attrs['sambaPwdLastSet'][0] = time() - (60 *60); if(isset($this->attrs['sambaPwdLastSet'][0])){ $last = $this->attrs['sambaPwdLastSet'][0]; @@ -711,23 +709,19 @@ class sambaAccount extends plugin /* A negative value means the password is outdated */ if($d < 0){ - $additional_info_PwdMustChange = sprintf(_("Invalid by domain policiy, since %s."), + $additional_info_PwdMustChange = sprintf(_("The password is outdated since %s, by domain policy."), date("d.m.Y H:i:s",$last + $sid['sambaMaxPwdAge'][0])); }else{ if($this->password_expires && ($last + $sid['sambaMaxPwdAge'][0]) > $this->sambaPwdMustChange){ - $additional_info_PwdMustChange = sprintf(_("Invalid by user policiy, on %s."), + $additional_info_PwdMustChange = sprintf(_("The password is valid till %s, by user policy."), date("d.m.Y H:i:s", $this->sambaPwdMustChange)); }else{ - $additional_info_PwdMustChange = sprintf(_("Invalid by domain policiy, on %s."), + $additional_info_PwdMustChange = sprintf(_("The password is valid till %s, by domain policy."), date("d.m.Y H:i:s", ($last + $sid['sambaMaxPwdAge'][0]))); } } } } - - $additional_info_KickoffTime = "asdf"; - - $smarty->assign("additional_info_KickoffTime",$additional_info_KickoffTime); $smarty->assign("additional_info_PwdMustChange",$additional_info_PwdMustChange); /* Show main page */ diff --git a/gosa-plugins/samba/personal/samba/samba3.tpl b/gosa-plugins/samba/personal/samba/samba3.tpl index c58cdbc11..9e158dd90 100644 --- a/gosa-plugins/samba/personal/samba/samba3.tpl +++ b/gosa-plugins/samba/personal/samba/samba3.tpl @@ -374,9 +374,15 @@ {html_options values=$years output=$years selected=$year} {/render} -
{$additional_info_PwdMustChange} + {if $additional_info_PwdMustChange} + + + ({$additional_info_PwdMustChange}) + + + {/if} {render acl=$sambaKickoffTimeACL checkbox=$multiple_support checked=$use_kickoff_time_set} @@ -403,7 +409,6 @@ -
{$additional_info_KickoffTime} -- 2.30.2