Code

Fix save bug. For DateOfBirth
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Nov 2006 06:55:45 +0000 (06:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Nov 2006 06:55:45 +0000 (06:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5097 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc

index cc0d30ac28ec786d56a00bf6f40b67913a1a56e8..c0492073a32a3939fd50f75cc7b0c56bfc540729 100644 (file)
@@ -647,9 +647,6 @@ class user extends plugin
     /* Only force save of changes .... 
        If this attributes aren't changed, avoid saving.
      */
-    if ($this->use_dob == "1"){
-      $this->dateOfBirth= date("Y-m-d", $this->dateOfBirth);
-    }
     if($this->gender=="0") $this->gender ="";
     if($this->preferredLanguage=="0") $this->preferredLanguage ="";
     
@@ -657,6 +654,9 @@ class user extends plugin
     /* First use parents methods to do some basic fillup in $this->attrs */
     plugin::save ();
 
+    if ($this->use_dob == "1"){
+      $this->attrs['dateOfBirth']= date("Y-m-d", $this->attrs['dateOfBirth']);
+    }
     /* Remove additional objectClasses */
     $tmp= array();
     foreach ($this->attrs['objectClass'] as $key => $set){