From 9cafba96393cdf7d6a8e146a38e34f8e9046bbd5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 14 Nov 2006 06:55:45 +0000 Subject: [PATCH] Fix save bug. For DateOfBirth git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5097 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index cc0d30ac2..c0492073a 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -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){ -- 2.30.2