On 5/8/07, <b class="gmail_sendername">Antonio Martinez Martinez</b> &lt;<a href="mailto:amm03@tid.es">amm03@tid.es</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000"><br>
In &quot;authenticate&quot; function, it appears next:<br>
<br>
$result = @ldap_bind($this-&gt;conn, $user[&#39;dn&#39;], $password);<br>
$result = ldap_bind($this-&gt;conn, $this-&gt;bind_username,
$this-&gt;bind_password);</div></blockquote><div><br>I&#39;m not a LDAP expert either, maybe the logic behind that code is not correct. My idea<br>was as follows. The first bind is the one I use to authenticate the user (and I save the
<br>result at $result). That LDAP connection ($this-&gt;conn) is required for searching (not only<br>authentication), so I do another bind, using the ldap binding user, to restore the binding to<br>its previous state (there isn&#39;t the &#39;$result =&#39; in the second line, as you posted).
<br><br></div></div>Regards,<br><br>Marco Aurélio<br>