diff --git a/ldapcherry/backend/backendLdap.py b/ldapcherry/backend/backendLdap.py index 1a546b8..8b0ea93 100644 --- a/ldapcherry/backend/backendLdap.py +++ b/ldapcherry/backend/backendLdap.py @@ -37,7 +37,7 @@ 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 @@ ) if len(r) == 0: ldap_client.unbind_s() - return False + return None ldap_client.unbind_s() if attrs: