Code

Added lost commit
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Oct 2009 08:08:19 +0000 (08:08 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Oct 2009 08:08:19 +0000 (08:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14458 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/generic/class_user.inc

index d011ff508ce4800e970a539504c5fa16bbef1883..92bd6f7f91cf07d39af98cfae80f34ca2a8643c3 100644 (file)
@@ -1164,8 +1164,11 @@ class user extends plugin
       if (!is_array($this->$attr)){
         $pattern= preg_replace("/%$attr/", $this->$attr, $pattern);
       } else {
-        msg_dialog::display(_("Error"), _("Cannot build RDN: invalid attribute parameters!"), ERROR_DIALOG);
-        break;
+        // Array elements cannot be used for ID generation
+        if (preg_match("/%$attr/", $pattern)) {
+          msg_dialog::display(_("Error"), _("Cannot build RDN: invalid attribute parameters!"), ERROR_DIALOG);
+          break;
+        }
       }
     }