In PHP, how can you bind using a property other than the default cn? (I'm not asking how to validate a user account using LDAP search queries, I'm specifically asking how I can bind using a sAMAaccountname and password in PHP).
In Perl, this is possible by specifying the property to query directly on the LDAP string:
ldap://ldap.example.com/dc=example,dc=com?sAMAccountName
The php ldap_connect funciton only takes a server name so these additional parameters are not able to be passed. Also the bind function only takes a connection, username, and password.