From: cajus Date: Mon, 27 Nov 2006 10:30:42 +0000 (+0000) Subject: Include personal title in cn/dn X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7697f34f9e7b22c3c38d429278e667f46a087f2b;p=gosa.git Include personal title in cn/dn git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5226 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/Changelog b/Changelog index 171baf411..88712e935 100644 --- a/Changelog +++ b/Changelog @@ -2,7 +2,7 @@ GOsa2 changelog =============== * gosa 2.5.7 - - + - Include personal title in DN * gosa 2.5.6 - Copy & paste implemented into FAI diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index c37ce5cba..6822ab713 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -84,8 +84,14 @@ 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." "; + } + if ($this->dn == 'new'){ - $baseobject->cn= $baseobject->givenName." ".$baseobject->sn; + $baseobject->cn= $tp.$baseobject->givenName." ".$baseobject->sn; $this->by_object['user']= $baseobject; if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){ $this->dn= 'uid='.$baseobject->uid.','.get_people_ou().$baseobject->base; @@ -99,7 +105,7 @@ class usertabs extends tabs if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){ $new_dn= 'uid='.$baseobject->uid.','.get_people_ou().$baseobject->base; } else { - $new_dn= "cn=".$baseobject->givenName." ".$baseobject->sn.','. + $new_dn= "cn=".$pt.$baseobject->givenName." ".$baseobject->sn.','. get_people_ou().$baseobject->base; } @@ -119,7 +125,7 @@ class usertabs extends tabs if ($this->dn != $new_dn){ /* Write entry on new 'dn' */ - $baseobject->cn= $baseobject->givenName." ".$baseobject->sn; + $baseobject->cn= $pt.$baseobject->givenName." ".$baseobject->sn; $baseobject->move($this->dn, $new_dn); $this->by_object['user']= $baseobject; diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 93fd5f77d..46ecbc77d 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -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"){