[horde] LDAP full DN

eculp@encontacto.net eculp at encontacto.net
Tue Jun 6 03:20:49 PDT 2006


Quoting Dave Liefbroer <dave at openlab.nl>:

> Hi all,
>
> I need to use the full DN of a logged in user in my Turba config  
> files, does Auth export the full DN somewhere?

You should be able to construct it.  I do the following.

$vdomain = strtolower(preg_replace('/^mail\.|^correo\./i', '', 
$_SERVER['HTTP_HOST']));
$uid = Auth::getBareAuth();
$mail = Auth::getAuth();
$basedn = 'dc=worldinternet,dc=org';

Which, together, give me:
'bind_dn' => 'mail=' . $mail . ',ou=people,ou=' . $vdomain . ',' . $basedn,

It could probably be better to use Auth::getAuth(); for both the 
$vdomain and $uid varibles but since I'm old and lazy . . .

good luck,

ed
>
>
> Dave
>
>
>
> -- 
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>





More information about the horde mailing list