Code

Fixed user dialog.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Nov 2007 12:18:32 +0000 (12:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Nov 2007 12:18:32 +0000 (12:18 +0000)
-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

index 12bffa95b1652f24b2a32e552129bea3969aed0a..5bc1c78f04d1f9b989c0b0e7dbbc2a61d791dff4 100644 (file)
@@ -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")){