by Iñaki Arenaza.
These edits are no longer needed if you are using version 2.0 or later.
If you are using 1.9 or earlier (which are not longer supported, not even for security bugfixes!), you need to modify auth/ldap/auth.php file.
Saludos. Iñaki.