Skip to content
Snippets Groups Projects
Unverified Commit 2cab805c authored by Alexandre Ferland's avatar Alexandre Ferland Committed by GitHub
Browse files

Merge pull request #54 from jm66/issue-44

Fixes #44 - Error in bind_user method
parents c0554780 e537f269
Branches
Tags
No related merge requests found
......@@ -150,7 +150,9 @@ class LDAP(object):
return
try:
conn = self.initialize
conn.simple_bind_s(user_dn.decode('utf-8'), password)
_user_dn = user_dn.decode('utf-8') \
if isinstance(user_dn, bytes) else user_dn
conn.simple_bind_s(_user_dn, password)
return True
except ldap.LDAPError:
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment