$filter = "(&(objectCategory=person)(objectClass=user)(sAMAccountName=" . $username . "))";
This will only work properly with AD (given the sAMAccountName property) but it correctly looks up the users.
This is what I get out of the login debug page now for my user:
LDAP[Filter][(&(objectCategory=person)(objectClass=user)(sAMAccountName=sryan))][OU=All Users,DC=arbor,DC=net]
LDAP[UserID][Converted objectSid S-1-5-21-1708537768-682003330-1417001333-18980 to user ID 18980]
I'm not sure if you need to add a flag in the config for which item to search for in the filter, but that filter should work fine for any AD installation.