RE: [PHP] ldap_search() question
| From: | Schechter, Ricky | Date: | Mon, 24 Nov 2003 16:32:24 +0000 |
| Subject: | RE: [PHP] ldap_search() question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170808@lists.php.net to get a copy of this message | ||
WORKED!
You've got it. I had to use the "$attr = "userPassword";" attribute in my
case.
Thank you very much, Kelly!
Ricky
-----Original Message-----
From: Kelly Hallman [mailto:khallman@ultrafancy.com]
Sent: Sunday, November 23, 2003 12:08 PM
To: Schechter, Ricky
Cc: 'php-general@lists.php.net'
Subject: Re: [PHP] ldap_search() question
On Sat, 22 Nov 2003, Schechter, Ricky wrote:
> Do I use ldap_search to authenticate users in LDAP? I can successfully
> search the LDAP and retrieve user's data based on a search criteria like
> (cn=something). If I use (password=somepass) or (userPassword=somepass)
> in the search criteria it comes back with no hits. How should this be
> done? Do I have to encrypt the password somehow?
You probably need to use ldap_compare() to verify the password. Most LDAP
servers won't send back the password field contents. Hope that helps!
--
Kelly Hallman
// Ultrafancy