Skip to content

Commit

Permalink
Use LDAP DN from search if prefix/suffix not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolev-es committed Feb 3, 2025
1 parent d4374e3 commit 0104adb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mailscanner/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3018,6 +3018,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'));
Expand Down

0 comments on commit 0104adb

Please sign in to comment.