From 0d73e8e8efae09512a61be506229fb37621f0304 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 9 Oct 2009 08:08:56 +0000 Subject: [PATCH] Added date checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14565 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../samba/personal/samba/class_sambaAccount.inc | 8 ++++++++ .../samba/personal/samba/class_sambaMungedDial.inc | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index a7928ba6a..d6d3f76e4 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -995,6 +995,14 @@ class sambaAccount extends plugin } } + /* Check dates */ + if (!tests::is_date($this->sambaKickoffTime)){ + $message[]= msgPool::invalid(_("Account expires after"), $this->sambaKickoffTime,"" ,"23.02.2009"); + } + if (!tests::is_date($this->sambaPwdMustChange)){ + $message[]= msgPool::invalid(_("Password expires on"), $this->sambaPwdMustChange,"" ,"23.02.2009"); + } + /* Too many workstations? Windows usrmgr only supports eight */ if (substr_count($this->sambaUserWorkstations, ",") >= 8){ $message[]= _("The windows usermanager allows eight clients at maximum!"); diff --git a/gosa-plugins/samba/personal/samba/class_sambaMungedDial.inc b/gosa-plugins/samba/personal/samba/class_sambaMungedDial.inc index 9f0c0b42d..788dcc2e5 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaMungedDial.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaMungedDial.inc @@ -444,21 +444,21 @@ class sambaMungedDial if($this->old_behavior==true) { $result= substr($this->ctx['CtxCfgFlags1'], 1, 1); } else { - $result= substr($this->ctx['CtxShadow'], 1, 1); + $result= substr($this->ctx['CtxShadow'], 1, 1); } - return $result; + return $result; } /* sets shadow value */ function setShadow ($checked, $value) { - if ($checked) { + if ($checked) { if($this->old_behavior==true) { // We need to reset the old setting $this->ctx['CtxCfgFlags1'][1]= sprintf('%1X', $value); } - $this->ctx['CtxShadow'][1]= sprintf('%1x', $value); - } + $this->ctx['CtxShadow'][1]= sprintf('%1x', $value); + } } /* gets connect-client-drive-at-logon value: enabled/disabled */ -- 2.30.2