[turba] problem with duplicate dn with LDAP backend
Edwin Culp
eculp at viviendaatualcance.com.mx
Tue Apr 6 03:54:03 PDT 2004
Quoting andreas oster <aoster at novanetwork.de>:
> hello list,
>
> I have run into a little problem with turba. I have set up a shared LDAp
> addressbook. I use a modified mozilla-schema and changed the appropriate
> settings in the attributes.php and sources.php file and everything works
> like a charm. Only the possibility of running into duplicate dn-problems
> gives me a headache. I would like to use 'uid' created from sn and some
> numer (Date?) in the dn. Is this possible ? How can I do this. I tried
> some things but unfortunately my PHP skills are only rudimental, and
> therefor didn't get very far :(
Andreas,
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:
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
More information about the turba
mailing list