diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index 4d5ab022..a305edec 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -695,8 +695,10 @@ class sambaAccount extends baseModule { 2 => array('kind' => 'help', 'value' => 'displayName')); // user attributes if ($_SESSION[$this->base]->type=='user') { - $canchangedate = getdate($this->attributes['pwdCanChange'][0]); - $mustchangedate = getdate($this->attributes['pwdMustChange'][0]); + if (isset($this->attributes['pwdCanChange'][0])) $canchangedate = getdate(intval($this->attributes['pwdCanChange'][0])); + else $canchangedate = getdate(0); + if (isset($this->attributes['pwdMustChange'][0])) $mustchangedate = getdate(intval($this->attributes['pwdMustChange'][0])); + else $mustchangedate = getdate(0); $return[] = array ( 0 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_h', 'type' => 'hidden', 'value' => $canchangedate['hours']), 1 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_m', 'type' => 'hidden', 'value' => $canchangedate['minutes']), 2 => array ( 'kind' => 'input', 'name' => 'pwdCanChange_s', 'type' => 'hidden', 'value' => $canchangedate['seconds']), diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index ecfd0858..93d91adc 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -770,9 +770,12 @@ class sambaSamAccount extends baseModule { } } } - $canchangedate = getdate($this->attributes['sambaPwdCanChange'][0]); - $mustchangedate = getdate($this->attributes['sambaPwdMustChange'][0]); - $expiredate = getdate($this->attributes['sambaKickoffTime'][0]); + if (isset($this->attributes['sambaPwdCanChange'][0])) $canchangedate = getdate(intval($this->attributes['sambaPwdCanChange'][0])); + else $canchangedate = getdate(0); + if (isset($this->attributes['sambaPwdMustChange'][0])) $mustchangedate = getdate(intval($this->attributes['sambaPwdMustChange'][0])); + else $mustchangedate = getdate(0); + if (isset($this->attributes['sambaKickoffTime'][0])) $expiredate = getdate(intval($this->attributes['sambaKickoffTime'][0])); + else $expiredate = getdate(0); $return[] = array( 0 => array('kind' => 'text', 'text' => _('Display name')),