[turba] Re: turba Digest, Vol 706, Issue 1
Edwin L. Culp
eculp at encontacto.net
Sun Apr 17 04:18:18 PDT 2005
Quoting alan walters <alan at aillweecave.ie>:
> Below is my ldap shared address sources.
> Everything works great but I want to be able to
> Search on the base o=clients.
>
> But all my records are in the vd=(somedomain)
> My username is user at example.com so I want to replace
> (somedomain) with example.com?????
Are you using apache virtual hosting? If so, the url for this example
would be something like mail.example.com? If so you could put
something like the following in sources.php root line:
'root' => 'vd=' . \
String::lower(preg_replace('|^mail\.|i', '', getenv('HTTP_HOST'))) . \
',o=clients,dc=radiowave,dc=net',
Does the user login with user at example.com either by using hooks or
manually? If true then you should be able to put something like the
following:
'root' => 'vd=' . preg_replace('|.*@|i', '', Auth::getAuth()) . \
',o=clients,dc=radiowave,dc=net',
Be careful with my typing of the above examples and the fact that they
are split on multiple lines, they are examples only to give you some
options ;).
good luck,
ed
>
> Any ideas
>
> $cfgSources['localldap'] = array(
> 'title' => _("Shared radiowave Directory"),
> 'type' => 'ldap',
> 'params' => array(
> 'server' => '127.0.0.1',
> 'port' => 389,
> 'tls' => false,
> 'root' => 'vd=example.com,o=clients,dc=radiowave,dc=net',
> 'bind_dn' => 'cn=manager,dc=radiowave,dc=net',
> 'bind_password' => 'test',
> 'sizelimit' => 200,
> 'dn' => array('cn'),
> 'objectclass' => array('top',
> 'person',
> 'organizationalPerson','inetOrgPerson'),
> 'scope' => 'one',
> 'charset' => 'iso-8859-1',
> // check if all required attributes for an entry are set and add them
> // if needed.
> 'checkrequired' => false,
> // string to put in missing required attributes.
> 'checkrequired_string' => ' ',
> 'version' => 3
> ),
> 'map' => array(
> '__key' => 'dn',
> '__uid' => 'mail',
> 'name' => 'cn',
> 'email' => 'mail',
> 'homePhone' => 'homephone',
> 'workPhone' => 'telephonenumber',
> 'cellPhone' => 'mobiletelephonenumber',
> 'homeAddress' => 'homepostaladdress'
> // 'freebusyUrl' => 'calFBURL'
> ),
> 'search' => array(
> 'name',
> 'email',
> 'homePhone',
> 'workPhone',
> 'cellPhone',
> 'homeAddress'
> ),
> 'strict' => array(
> 'dn',
> ),
> 'public' => true,
> 'readonly' => false,
> 'admin' => array(),
> 'export' => true
> );
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.15 - Release Date: 16/04/2005
>
> --
> Turba mailing list - Join the hunt: http://horde.org/bounties/#turba
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: turba-unsubscribe at lists.horde.org
>
More information about the turba
mailing list