From 53faf49fa83eabab75d4b2c664851068d79a7737 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Jul 2010 13:07:54 +0000 Subject: [PATCH] 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 --- gosa-core/plugins/personal/generic/class_user.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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= ""; } + } -- 2.30.2