Code

Correct dob if forked from template
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Feb 2010 14:18:37 +0000 (14:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Feb 2010 14:18:37 +0000 (14:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15598 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index d38f46ee2ce946fffa5ea0b02e8b110be5e83046..8214ef77c311c7f57269d94faff23db00b7d50e8 100644 (file)
@@ -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";
+    }
   }