Merge pull request #1742 from BastelBaus/patch-2

Update ldap.py
This commit is contained in:
Peter Bieringer 2025-03-26 05:50:28 +01:00 committed by GitHub
commit 6b83c409d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,7 +248,7 @@ class Auth(auth.BaseAuth):
logger.debug("_login3 LDAP groups of user: %s", ",".join(self._ldap_groups)) logger.debug("_login3 LDAP groups of user: %s", ",".join(self._ldap_groups))
if self._ldap_user_attr: if self._ldap_user_attr:
if user_entry['attributes'][self._ldap_user_attr]: if user_entry['attributes'][self._ldap_user_attr]:
login = user_entry['attributes'][self._ldap_user_attr][0] login = user_entry['attributes'][self._ldap_user_attr]
logger.debug(f"_login3 user set to: '{login}'") logger.debug(f"_login3 user set to: '{login}'")
conn.unbind() conn.unbind()
logger.debug(f"_login3 {login} successfully authenticated") logger.debug(f"_login3 {login} successfully authenticated")