[horde] LDAP full DN
Barry Flanagan
barryf-lists at flanagan.ie
Tue Jun 6 05:16:35 PDT 2006
Dave Liefbroer wrote:
> That won't work, because I have all my users in their own domains inside
> the tree (virtual hosting environment).
>
> When you log into horde, Auth looks up the dn, but as for as I can see
> it isn't stored anywhere.
>
You should be able to use a hook (perhaps postauthenticate) to get the
value of the DN and store it in a $_SESSION variable. You can then
access it wherever you need to.
Hope this helps.
-Barry
> Dave
>
>
> Quoting eculp at encontacto.net:
>
>> 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
>>>
>>
>>
>>
>> --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
>
>
> --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
--
-Barry Flanagan
More information about the horde
mailing list