From d44a98da65df3295c46aebf671d1ab419adffff8 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 13 Feb 2006 08:08:34 +0000 Subject: [PATCH] Fix user->generic, to support new cleanup system, government attributes wasn't stored in saved_attributes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2666 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 1666d5759..d1eecf77e 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -103,27 +103,30 @@ class user extends plugin 'dn' from LDAP */ function user ($config, $dn= NULL) { - /* Configuration is fine, allways */ $this->config= $config; + /* Configuration is fine, allways */ + if ($this->config->current['GOVERNMENTMODE']){ + $this->attributes=array_merge($this->attributes,$this->govattrs); + } /* Load base attributes */ plugin::plugin ($config, $dn); - /* Load government mode attributes */ if ($this->config->current['GOVERNMENTMODE']){ + /* Fix public visible attribute if unset */ + if (!isset($this->attrs['publicVisible'])){ + $this->publicVisible == "nein"; + } + } + /* Load government mode attributes */ + if ($this->config->current['GOVERNMENTMODE']){ /* Copy all attributs */ foreach ($this->govattrs as $val){ if (isset($this->attrs["$val"][0])){ $this->$val= $this->attrs["$val"][0]; } } - - /* Fix public visible attribute if unset */ - if (!isset($this->attrs['publicVisible'])){ - $this->publicVisible == "nein"; - } - } /* Create me for new accounts */ @@ -970,9 +973,6 @@ class user extends plugin } /* Check phone numbers */ - if (!is_phone_nr($this->homePhone)){ - $message[]= _("The field 'Phone' contains an invalid phone number."); - } if (!is_phone_nr($this->telephoneNumber)){ $message[]= _("The field 'Phone' contains an invalid phone number."); } -- 2.30.2