Code

Fixed adapt from template method.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jul 2010 13:07:54 +0000 (13:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jul 2010 13:07:54 +0000 (13:07 +0000)
-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

index 2a0ff3cf2fede2c7acdcff03c884acc1c524a7a5..8681b44fa6bb61bc69d649f4590519b71d4c7dc0 100644 (file)
@@ -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= "";
     }
+
   }