diff --git a/mailscanner/functions.php b/mailscanner/functions.php index ed2b789c..5cde8185 100644 --- a/mailscanner/functions.php +++ b/mailscanner/functions.php @@ -3051,6 +3051,9 @@ function ldap_authenticate($username, $password) if (defined('LDAP_BIND_SUFFIX')) { $user .= LDAP_BIND_SUFFIX; } + if (!defined('LDAP_BIND_PREFIX') && !defined('LDAP_BIND_SUFFIX')) { + $user=$result[0]['dn']; + } if (!isset($result[0][LDAP_EMAIL_FIELD])) { @trigger_error(__('ldapno03') . ' "' . LDAP_EMAIL_FIELD . '" ' . __('ldapresults03'));