From: hickert Date: Mon, 8 Jan 2007 10:45:10 +0000 (+0000) Subject: Added configuration flag flag. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2072164c836c4825c3c879ee7f60feed100c0d1b;p=gosa.git Added configuration flag flag. 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 --- diff --git a/FAQ b/FAQ index 697f75363..89cdfd27a 100644 --- 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. + + diff --git a/contrib/gosa.conf b/contrib/gosa.conf index e7ac47267..75f3d725d 100644 --- a/contrib/gosa.conf +++ b/contrib/gosa.conf @@ -261,6 +261,7 @@ hash="{CRYPT}" dnmode="{DNMODE}" server="{LDAPHOST}" + include_personal_title="false" config="ou=gosa,ou=configs,ou=systems,{LDAPBASE}"> diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index b8cb962bf..9466dfb52 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -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'){ diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 1b14539b8..c24f100f0 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -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? */