add comment how $tmpDN is used

This commit is contained in:
Uwe Steinmann 2024-03-20 14:02:24 +01:00
parent 18715fe4fa
commit 5235a859fc

View File

@ -127,6 +127,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
*/ */
if (isset($settings->_ldapBaseDN)) { if (isset($settings->_ldapBaseDN)) {
$ldapSearchAttribut = "uid="; $ldapSearchAttribut = "uid=";
/* $tmpDN will only be used as a last resort if searching for the user failed */
$tmpDN = "uid=".$username.",".$settings->_ldapBaseDN; $tmpDN = "uid=".$username.",".$settings->_ldapBaseDN;
} }
@ -134,6 +135,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
if (isset($settings->_ldapType)) { if (isset($settings->_ldapType)) {
if ($settings->_ldapType==1) { if ($settings->_ldapType==1) {
$ldapSearchAttribut = "sAMAccountName="; $ldapSearchAttribut = "sAMAccountName=";
/* $tmpDN will only be used as a last resort if searching for the user failed */
$tmpDN = $username.'@'.$settings->_ldapAccountDomainName; $tmpDN = $username.'@'.$settings->_ldapAccountDomainName;
// Add the following if authentication with an Active Dir doesn't work // Add the following if authentication with an Active Dir doesn't work
// See https://sourceforge.net/p/seeddms/discussion/general/thread/19c70d8d/ // See https://sourceforge.net/p/seeddms/discussion/general/thread/19c70d8d/