From: hickert Date: Wed, 21 Jul 2010 13:07:54 +0000 (+0000) Subject: Fixed adapt from template method. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=53faf49fa83eabab75d4b2c664851068d79a7737;p=gosa.git Fixed adapt from template method. -It is now capable to handle dob git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@19039 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index 2a0ff3cf2..8681b44fa 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -1538,13 +1538,18 @@ class user extends plugin $this->givenName= $this->parent->givenName; } - if ($this->dateOfBirth) { + + /* Generate dateOfBirth entry */ + if (isset ($this->attrs['dateOfBirth'])){ /* This entry is ISO 8601 conform */ - list($year, $month, $day)= explode("-", $this->dateOfBirth, 3); - + list($year, $month, $day)= explode("-", $this->attrs['dateOfBirth'][0], 3); + #TODO: use $lang to convert date $this->dateOfBirth= "$day.$month.$year"; + } else { + $this->dateOfBirth= ""; } + }