[turba] Newline in ldap mapping
Jens-Malte Gottfried
jmgottfried at web.de
Wed May 26 15:16:28 UTC 2010
Dear Madam, dear Sir.
I am trying to map the ldap attributes "street", "postalcode" and "l" to
the workAddress field in Turba.
Is there any possibility to add a newline in the format string?
"<br />" or "\n" are escaped properly, showing up literally in the
address entry instead of causing a newline there. Adding a "$" as it is
parsed in ldap-entries does also not work.
My (non-working) mapping looks as follows:
$uid = Auth::getBareAuth();
$basedn = 'xxx';
$cfgSources['public_ldap'] = array(
'title' => _("Addressbuch"),
'type' => 'ldap',
'params' => array(
'server' => 'localhost',
'tls' => false,
'root' => 'ou=public,ou=addressbook,...',
'bind_dn' => 'uid=' . $uid . ',ou=users,' . $basedn,
'bind_password' => Auth::getCredential('password'),
'dn' => array('cn'),
'objectclass' => array('inetOrgPerson'),
'scope' => 'one',
'charset' => 'utf-8',
'version' => 3
),
'map' => array(
'__key' => 'dn',
'__uid' => 'uid',
'name' => 'cn',
'email' => 'mail',
'lastname' => 'sn',
'title' => 'title',
'company' => 'organizationname',
'businessCategory' => 'businesscategory',
//'workAddress' => 'postaladdress',
'workAddress' => array(
'fields' => array('workStreet', 'workPostalCode',
'workCity'),
'format' => '%s<br />%s %s',
),
'workStreet' => 'street',
'workPostalCode' => 'postalcode',
'workCity' => 'l',
'workPhone' => 'telephonenumber',
'fax' => 'facsimiletelephonenumber',
'homeAddress' => 'homepostaladdress',
'homePhone' => 'homephone',
...
Version-Information (working on Debian Etch):
apache2: 2.2.3-4+etch11
php5: 5.2.0+dfsg-8+etch16
slapd: 2.3.30-5+etch3
php5-ldap: 5.2.0+dfsg-8+etch16
horde3: 3.1.3-4etch7
turba2: 2.1.3-1etch1
Regards,
Jens-Malte Gottfried
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.horde.org/archives/turba/attachments/20100526/09c71d62/attachment.bin>
More information about the turba
mailing list