Code

Updated class user
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 11:30:15 +0000 (11:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 11:30:15 +0000 (11:30 +0000)
-Fixed problem with date of birth and copy & paste

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17879 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index b44b93ba26da464427546204fcab2dd7227b3399..7e02c71ede3174263ad804b74125c4fdab7b0f08 100644 (file)
@@ -1643,6 +1643,18 @@ class user extends plugin
     $this->old_userPKCS12= "";
     $this->old_userSMIMECertificate= "";
     $this->old_userCertificate= "";
+
+    /* Generate dateOfBirth entry */
+    if (isset ($source['dateOfBirth'])){
+
+        /* This entry is ISO 8601 conform */
+        list($year, $month, $day)= explode("-", $source['dateOfBirth'][0], 3);
+
+#TODO: use $lang to convert date
+        $this->dateOfBirth= "$day.$month.$year";
+    } else {
+        $this->dateOfBirth= "";
+    }
   }