many examples show the crux of LDAP as binding/authenticating some person's username and password. mine works only with admin name and password. essence of the commands is here:
$ldapLink = ldap_connect($ldap_server) or die("Can't establish LDAP connection");
$ldap_bind = ldap_bind($ldapLink, $ldapUser, $ldapPswd) or die("Can't bind to the server");
that User and Pswd works only as admin. however, once in, to search for a person, i can find someone using their email address, as follows, but cannot search for their "uid" which is supposed to be userid. when i add uid=aeinstein, it returns with a count = 0.
$results = ldap_search($ldapLink, "OU=Raleigh,DC=cshlaw,DC=com", "mail=username@domain.com");
that finds 1 individual. so the REAL question is can someone please show me code that [1]ok, accesses the ldap server as admin, that is fine, but ALSO [2]really authenticates a username, password of a regular person/non-admin?? so many examples show username, password in the field where MY admin username, password are; is our system somehow missing something, since maybe all users should be able to connect to the ldap server?
deadline this week, and after 10 weeks of coding, really need to get ldap to work. thx muy mucho for any help!!!