On 5/8/07, <b class="gmail_sendername">Antonio Martinez Martinez</b> <<a href="mailto:amm03@tid.es">amm03@tid.es</a>> 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 "authenticate" function, it appears next:<br>
<br>
$result = @ldap_bind($this->conn, $user['dn'], $password);<br>
$result = ldap_bind($this->conn, $this->bind_username,
$this->bind_password);</div></blockquote><div><br>I'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->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't the '$result =' in the second line, as you posted).
<br><br></div></div>Regards,<br><br>Marco Aurélio<br>