From f09f544a8a8e2ebb24509f213ed66075b009b151 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 23 Nov 2007 12:18:32 +0000 Subject: [PATCH] Fixed user dialog. -Save was possible without specifying sn git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7873 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/class_user.inc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 12bffa95b..5bc1c78f0 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -1055,14 +1055,8 @@ class user extends plugin $this->set_acl_base($this->base); } - if(!$this->multiple_support_active){ - /* must: sn, givenName, uid */ - if ($this->sn == "" && ($this->acl_is_writeable("sn",(!is_object($this->parent) && !isset($_SESSION['edit'])) || ($this->is_new)))){ - $message[]= _("The required field 'Name' is not set."); - } - /* UID already used? */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); @@ -1074,10 +1068,13 @@ class user extends plugin /* In template mode, the uid and givenName are autogenerated... */ if (!$this->is_template){ - if ($this->givenName == "" && $this->acl_is_writeable("givenName",(!is_object($this->parent) && !isset($_SESSION['edit'])))){ + if ($this->sn == ""){ + $message[]= _("The required field 'Name' is not set."); + } + if ($this->givenName == ""){ $message[]= _("The required field 'Given name' is not set."); } - if ($this->uid == "" && $this->acl_is_writeable("uid",(!is_object($this->parent) && !isset($_SESSION['edit'])))){ + if ($this->uid == ""){ $message[]= _("The required field 'Login' is not set."); } if (!(isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid")){ -- 2.30.2