From: cajus Date: Fri, 5 Feb 2010 14:18:37 +0000 (+0000) Subject: Correct dob if forked from template X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=528c0fc78ebafc7b44a6400a74af76cfde80474b;p=gosa.git Correct dob if forked from template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15598 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 d38f46ee2..8214ef77c 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -1485,6 +1485,14 @@ class user extends plugin $this->sn= $this->parent->sn; $this->givenName= $this->parent->givenName; } + + if ($this->dateOfBirth) { + /* This entry is ISO 8601 conform */ + list($year, $month, $day)= explode("-", $this->dateOfBirth, 3); + + #TODO: use $lang to convert date + $this->dateOfBirth= "$day.$month.$year"; + } }