I am currently in the process of upgrading our Resource Space installation from version 4.3.2912 to version 4.5.3428.
We utilize LDAP to authorize against AD and that process is now broken. When trying to login, I am getting the following error:
"plugins/ldapauth/hooks/all.php line 16: Undefined index: anonymous"
Or if removing that reference the following error:
"plugins/ldapauth/hooks/all.php line 20: ldap_bind(): Unable to bind to server: Can't contact LDAP server"
These are resulting from the code snippet below:
"
<?php
function HookLdapauthAllExternalauth($uname, $pword){
global $ldapauth;
global $username;
global $password;
global $password_hash;
global $groupcomment;
if ($uname != "" && $pword != "") {
$ds = ldap_connect($ldapauth['ldapserver']);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$auth = false;
if (!($ldapauth['anonymous'])){
$res = ldap_bind($ds,$ldapauth['rootdn'],$ldapauth['rootpass']);
} else {
debug("binding anonymously");
}
"
I inherited this slightly modified LDAP plugin and it worked before trying to upgrade. I'm not sure what would have changed in the process but perhaps someone here resolved a similar issue?
Any thoughts?
Thank you,
Harry