6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
3/29/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#2529] Problems with "cn", "name" and ldap (patch)
*
Your Email Address
*
Spam protection
Enter the letters below:
.__.. ..___. ..___ | ||_/ [__ |\ |[__ |__\| \| | \||
Comment
> Because I prefer to separate firstname and lastname in my address > book, I have the following in my "sources.php": > > > > 'name' => array('fields' => array('firstname', 'lastname'), > > 'format' => '%s %s'), > > 'firstname' => 'givenname', > > 'lastname' => 'sn', > > > > This leads to a problem where cn is not set when I add a new contact, > and this again leads to an object violation. > > So I added this patch, to create the cn from givenname and sn if it > does not exist: > > There should probably be some sort of checking if sn and givenname is > set, but as they are marked as required per default, I believe this > is taken care of elsewhere. > > > > --- turba/lib/Driver/ldap.php.orig 2005-08-30 08:55:35.000000000 +0200 > > +++ turba/lib/Driver/ldap.php 2005-08-30 08:59:52.000000000 +0200 > > @@ -219,6 +219,11 @@ > > $dn = $attributes['dn']; > > unset($attributes['dn']); > > > > + /* If the CN does not exist, create it from SN and GIVENNAME */ > > + if (!$attributes['cn']) { > > + $attributes['cn'] = $attributes['givenname'] . " " . > $attributes['sn']; > > + } > > + > > /* Put the objectClass into the attributes array. */ > > if (!is_array($this->_params['objectclass'])) { > > $attributes['objectclass'] = $this->_params['objectclass']; > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers