mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
more logical return for get_user
This commit is contained in:
parent
b65fe7bc7b
commit
efa7012adb
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ class Backend(ldapcherry.backend.Backend):
|
|||
def auth(self, username, password):
|
||||
|
||||
binddn = self.get_user(username, False)
|
||||
if binddn:
|
||||
if not binddn is None:
|
||||
ldap_client = self._connect()
|
||||
try:
|
||||
ldap_client.simple_bind_s(binddn, password)
|
||||
|
@ -97,7 +97,7 @@ class Backend(ldapcherry.backend.Backend):
|
|||
)
|
||||
if len(r) == 0:
|
||||
ldap_client.unbind_s()
|
||||
return False
|
||||
return None
|
||||
|
||||
ldap_client.unbind_s()
|
||||
if attrs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue