diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index ab2ea9bf2..3f09aef48 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -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; }