Code

Include personal title in cn/dn
[gosa.git] / plugins / personal / generic / class_user.inc
index e7c13fefd0ac3d6397a473ce29f20c7cc69f7b71..46ecbc77d434db966131cb7fe6910dbc588d2228 100644 (file)
@@ -957,8 +957,8 @@ class user extends plugin
 
       } else {
 
-        /* User doesn't exists, create it when pw_storage is kerberos. */
-        if ($this->pw_storage == "kerberos"){
+        /* User doesn't exists, create it when pw_storage is kerberos or SASL. */
+        if ($this->pw_storage == "kerberos" || $this->pw_storage == "sasl" ){
           $ret= kadm5_create_principal ( $handle, $principal);
 
           if ($ret === FALSE){
@@ -993,7 +993,12 @@ class user extends plugin
     $message= plugin::check();
 
     /* Assemble cn */
-    $this->cn= $this->givenName." ".$this->sn;
+    if ($this->personalTitle == ""){
+      $pt= "";
+    } else {
+      $pt= $this->personalTitle." ";
+    }
+    $this->cn= $pt.$this->givenName." ".$this->sn;
 
     /* Permissions for that base? */
     if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){