I noticed a bug in the LDAP authentication code. We are trying to set the users idnumber field as the dn for the user.
However, in the function 'auth_get_userinfo()' there is a bug. For our LDAP entry, since the dn is not entered as an array, it only grabs the first character of the string entry resulting in the idnumber field getting set to 'u' for everyone. A simple is_array solves the problem. Attached is a diff file (from MOODLE_15_STABLE) for lib.php in '$CFG->dirroot/auth/ldap'
Could somebody please review this and patch in CVS? It is tested and working for us. I would do it myself, but I'm not sure what etiquette says for editing code done by others unless you are one of the core developers.