Details
Description
Currently it is not possible to anonymously bind to a LDAP server - it's required to provide a username and a passwort for a bind. It also is not possible to do an account search without prior binding as a distinct user. But LDAP generally allows for anonymous binds to LDAP servers.
It should be no problem to add this feature as the ext/ldap also provides this functionality.
Just a quick & dirty solution (this surely can be refactored more nicely):
Zend/Ldap.php:
Add after line 632:
if ($username===null && $password===null) $bindAnonymously=true; else $bindAnonymously=false;
Change line 634:
if (!$bindAnonymously && !$username) {
Change line 644:
if (!$bindAnonymously && !Zend_Ldap::explodeDn($username)) {
Change line 688:
$message = ($bindAnonymously) ? "anonymous bind" : $username;
Patch to include quick&dirty solution to anonymous bind.