(legacy) fix ldap binddn and password for proper anon usage

This commit is contained in:
Ad Schellevis 2015-07-27 18:17:57 +02:00
parent 39beb18171
commit 89db2963ce

View File

@ -1228,6 +1228,14 @@ function auth_get_authserver($name) {
if (!empty($authcfg['ldap_port'])) {
$authcfg['ldap_full_url'] .= ":{$authcfg['ldap_port']}";
}
// make sure a user and password entry exists and are null for anonymous usage
if (empty($authcfg['ldap_binddn'])) {
$authcfg['ldap_binddn'] = null;
}
if (empty($authcfg['ldap_bindpw'])) {
$authcfg['ldap_bindpw'] = null;
}
}
return $authcfg;
}