[dev] problems with horde/lib/Prefs/LDAP.php
Jon Parise
jon@csh.rit.edu
Mon, 29 Jan 2001 21:03:01 -0500
On Mon, Jan 29, 2001 at 09:34:34PM +0100, Atif Ghaffar wrote:
> I see that LDAP.php makes a search for
> $conf['prefs']['params']['uid'] = "username" to get the result about the
> user.
> Then in the function connect it stores
> in this->dn
> $uid . '=' . $result[0][$uid][0] . ',' . $this->params['basedn'];
> which is wrong.
>
> I defined basedn to be "o=ispman" which is the top of the tree.
> and if you search for uid=aghaffar you will get
> dn: uid=aghaffar, ou=users, domain=developer.ch, o=ispman
> but LDAP.php is only storing "uid=aghaffar, o=ispman"
> which makes an error when a store operation in done on that leaf because
> if does not exists.
>
> I experimented and changed the line to
> $this->dn=$result[0]["dn"];
> which solves the problem.
>
> I havent looked into it a lot to see if there was a special reason to do
> a "uid=something" . "$basedn".
> If there is please correct me.
That looks like a good fix to me. I'll review it in more detail in a
little bit and, unless I find any problems, I'll commit it later on
tonight.
Thanks for bringing this up. All of our entries here at RIT all fall
within one DN, so I probably wouldn't have noticed my error any time
soon.
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House Member