mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
more logical return for get_user
This commit is contained in:
parent
b65fe7bc7b
commit
efa7012adb
@ -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…
Reference in New Issue
Block a user