From: hickert Date: Fri, 10 Feb 2006 08:22:46 +0000 (+0000) Subject: Only store changed attribute X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=246b37e80c01e719236616fe42dfec1c2ca71fc0;p=gosa.git Only store changed attribute git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2655 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index be868c57d..ca2dcb5e4 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -691,7 +691,7 @@ class posixAccount extends plugin $this->shadowExpire= "0"; } else { /* Transform seconds to days here */ - $this->shadowExpire= (int)($this->shadowExpire / (60 * 60 * 24)) + 1; + $this->shadowExpire= (int)($this->shadowExpire / (60 * 60 * 24)) ; } if (!$this->use_shadowMax){ $this->shadowMax= "0"; @@ -764,11 +764,14 @@ class posixAccount extends plugin /* Fill gecos */ if (isset($this->parent) && $this->parent != NULL){ $this->gecos= rewrite($this->parent->by_object['user']->cn); - if (!preg_match('/[a-z0-9 -]/i', $this->gecos)){ - $this->gecos= ""; - } + if (!preg_match('/[a-z0-9 -]/i', $this->gecos)){ + $this->gecos= ""; + } } + foreach(array("shadowMin","shadowMax","shadowWarning","shadowInactive","shadowExpire") as $attr){ + $this->$attr = (int) $this->$attr; + } /* Call parents save to prepare $this->attrs */ plugin::save(); @@ -801,9 +804,6 @@ class posixAccount extends plugin $thid->attrs['gosaDefaultPrinter']=array(); } - foreach(array("shadowMin","shadowMax","shadowWarning","shadowInactive") as $attr){ - $this->attrs[$attr] = (int) $this->attrs[$attr]; - } /* Save data to LDAP */ $ldap->cd($this->dn);