[turba] Re: problem with duplicate dn with LDAP backend
andreas oster
aoster at novanetwork.de
Tue Apr 6 04:34:41 PDT 2004
Edwin Culp wrote:
> Why not just use mail rather than uid in your dn. That
> should always be unique. It has always seemed much simpler
> to me. For example my users dn is:
>
dear Edwin,
thank you for your hint, butI think this is not always true.
Imagine you have two people that receice their mail from one
account (for example info at somecompany.com). If you want to
insert an entry for both persons you run into the same
'duplicate dn' problem.
> dn:
> mail=eculp at viviendaatualcance.com.mx,ou=people,o=an_ldap_base
>
> another is:
>
> dn: mail=eculp at encontacto.net,ou=people,o=an_ldap_base
>
> it is also trivial to separate into $user=eculp and
> $vdomain=encontacto.net by just using a couple of php
> functions that you will find in horde/hooks.php like
>
> $uid = Auth::getBareAuth(); or
> $uid = preg_replace('|@.*|i', '', Auth::getAuth();
> and
> $vdomain = preg_replace('|.*@|i', '', Auth::getAuth(); or if
> you want/need to use HTTP_HOST:
> $vdomain =
> strtolower(preg_replace('/^mail\.|^www\.|^www\.mail\./i',
> '', $_SERVE
> R['HTTP_HOST']));
>
> Hope this helps a bit,
>
> ed
>
>>
>> Can somebody help me with this problem/task ?
>>
>> Thanks for your kind help
>>
>> Andreas
>>
>> --
>> 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
>
>
>
best regards
Andreas
More information about the turba
mailing list