Code

Added configuration flag flag.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Jan 2007 10:45:10 +0000 (10:45 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 8 Jan 2007 10:45:10 +0000 (10:45 +0000)
include_personal_title="true/false"
This flag specifies if we add the personalTitle attribute to the users dn

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5478 594d385d-05f5-0310-b6e9-bd551577e9d8

FAQ
contrib/gosa.conf
plugins/admin/users/tabs_user.inc
plugins/personal/generic/class_user.inc

diff --git a/FAQ b/FAQ
index 697f75363bff36f53953ed77e49bfb74fd3a4650..89cdfd27a9211360130d04ae1d5d0c92945df77f 100644 (file)
--- a/FAQ
+++ b/FAQ
@@ -345,3 +345,11 @@ Q: New implementations of OpenLDAP seem to require {sasl} instead of {kerberos}
 
 A: You can set "krbsasl" to "true" in your gosa.conf's main section.
 
+
+Q: Is there a way to add the personalTitle attribute the the users dn?
+
+A: Just add this line into the location section of your gosa.conf.
+   <location name=...
+       include_personal_title="true"
+   ...>
+
index e7ac47267a884ea144b2e19a830904b641abf177..75f3d725d3d85a1ebd744a64a2e59d758548e111 100644 (file)
                        hash="{CRYPT}"
                        dnmode="{DNMODE}"
                        server="{LDAPHOST}"
+                       include_personal_title="false"
                        config="ou=gosa,ou=configs,ou=systems,{LDAPBASE}">
 
 
index b8cb962bf98ead72e48620387fe43f963b1c5a97..9466dfb520b305375adbbf6652a0e62285f9e016 100644 (file)
@@ -84,10 +84,13 @@ class usertabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['user'];
-    if ($baseobject->personalTitle == ""){
-      $pt= "";
-    } else {
-      $pt= $baseobject->personalTitle." ";
+
+    /* Assemble cn */
+    $pt= "";
+    if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
+      if(!empty($baseobject->personalTitle)){
+        $pt = $baseobject->personalTitle." ";
+      }
     }
 
     if ($this->dn == 'new'){
index 1b14539b8f284cdd4699703d7c1d714e88982d7a..c24f100f06db46e18e03179de982bf3b060dba37 100644 (file)
@@ -998,11 +998,13 @@ class user extends plugin
     $message= plugin::check();
 
     /* Assemble cn */
-    if ($this->personalTitle == ""){
-      $pt= "";
-    } else {
-      $pt= $this->personalTitle." ";
+    $pt= "";
+    if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
+      if(!empty($this->personalTitle)){
+        $pt = $this->personalTitle." ";
+      }
     }
+    
     $this->cn= $pt.$this->givenName." ".$this->sn;
 
     /* Permissions for that base? */