summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f9a3f1)
raw | patch | inline | side by side (parent: 6f9a3f1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Oct 2006 06:24:47 +0000 (06:24 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Oct 2006 06:24:47 +0000 (06:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4901 594d385d-05f5-0310-b6e9-bd551577e9d8
Changelog | patch | blob | history | |
plugins/personal/posix/class_posixAccount.inc | patch | blob | history |
diff --git a/Changelog b/Changelog
index 13644928eb9b67031b815aa9a11fb9efe3e7efb0..d4dea3fa091b4e64bdd1211b124c7b201b797b86 100644 (file)
--- a/Changelog
+++ b/Changelog
inherited from object groups.
- Show error messages from password dialog
- Fixed a set of W3C problems
+ - Fixed multiple savings in addressbook (Closes: #23)
+ - Fixed shadow expire when using templates (Closes: #20)
* gosa 2.5.4
- Included patch to choose the addressbook base
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index ff4cef179f9686697893cbb95e4e9647fc77d2a4..7ae5503f28e667b5ba6cdd0c8d7fdbc33f26664e 100644 (file)
}
/* Convert to seconds */
- if ($this->shadowExpire != 0){
- $this->shadowExpire*= 60 * 60 * 24;
- } else {
- $date= getdate();
- $this->shadowExpire= floor($date[0] / (60*60*24)) * 60 * 60 * 24;
- }
+ $this->shadowExpire= $this->convertToSeconds($this->shadowExpire);
/* Generate shell list from /etc/gosa/shells */
if (file_exists('/etc/gosa/shells')){
$this->primaryGroup= $this->gidNumber;
}
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gosaUserTemplate)(uid=".$template.")(accessTo=*))", array("cn","accessTo"));
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gosaUserTemplate)(uid=".$template.")(accessTo=*))", array("cn","accessTo"));
+
+ while($attr = $ldap->fetch()){
+ $tmp = $attr['accessTo'];
+ unset ($tmp['count']);
+ $this->accessTo = $tmp;
+ }
- while($attr = $ldap->fetch()){
- $tmp = $attr['accessTo'];
- unset ($tmp['count']);
- $this->accessTo = $tmp;
- }
-
/* Adjust shadow checkboxes */
foreach (array("shadowMin", "shadowMax", "shadowWarning", "shadowInactive",
"shadowExpire") as $val){
$this->$oval= "1";
}
}
+
+ $this->shadowExpire= $this->convertToSeconds($this->shadowExpire);
}
function get_next_id($attrib)
return($ret);
}
+
+ function convertToSeconds($val)
+ {
+ if ($val != 0){
+ $val*= 60 * 60 * 24;
+ } else {
+ $date= getdate();
+ $val= floor($date[0] / (60*60*24)) * 60 * 60 * 24;
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: