Code

Updated accountRDN property handling
[gosa.git] / gosa-core / plugins / personal / generic / class_user.inc
index accfef029ff36a60cae48b498d75d2e66057a193..b81be284c3904b0ca47389be2da75143c6580ed7 100644 (file)
@@ -175,7 +175,7 @@ class user extends plugin
     }
 
     /* Make hash default to md5 if not set in config */
-    $hash= $this->config->get_cfg_value("core","passwordDefaultHash", "crypt/md5");
+    $hash= $this->config->get_cfg_value("core","passwordDefaultHash");
 
     /* Load data from LDAP? */
     if ($dn !== NULL){
@@ -1241,7 +1241,7 @@ class user extends plugin
   function update_new_dn()
   {
     // Alternative way to handle DN
-    $pattern= $this->config->get_cfg_value("core","accountRDN");
+    $pattern= $this->config->get_cfg_value("user","accountRDN");
     if ($pattern != "") {
       $rdn= $this->create_initial_rdn($pattern);
       $attribute= preg_replace('/=.*$/', '', $rdn);
@@ -1687,6 +1687,22 @@ class user extends plugin
         "plCategory"    => array("users" => array("description" => _("Users"),
                                                   "objectClass" => "gosaAccount")),
 
+
+        "plProperties" => array(
+            array(
+                "name"          => "accountRDN",
+                "type"          => "string",
+                "default"       => "",
+                "description"   => sprintf(
+                    _("The 'accountRDN' option tells GOsa to use a placeholder pattern for generating account RDNs. A pattern can include attribute names prefaced by a % and normal text: %s. This will generate a RDN consisting of cn=.... filled with surname and given name of the edited account. This option disables the use of accountPrimaryAttribute and personalTitleInDn."), 
+                    "accountRDN=\"cn=%sn %givenName\""),
+                "check"         => "gosaProperty::isString",
+                "migrate"       => "",
+                "group"         => "plugin",
+                "mandatory"     => FALSE
+                )
+
+            ),
         "plProvidedAcls" => array(
 
           "sn"                => _("Surname"),