feat(ldap): implement function to check user existence
This commit is contained in:
parent
5145f3a4e8
commit
65de54cfad
1 changed files with 2 additions and 2 deletions
|
@ -575,8 +575,8 @@ def user_exists(connection: Connection, user_dn: str) -> bool:
|
|||
_assert_is_valid_connection(connection)
|
||||
_assert_is_valid_user_dn(user_dn)
|
||||
|
||||
# TODO implement
|
||||
return False
|
||||
connection.search(user_dn, '(objectclass=inetOrgPerson)')
|
||||
return len(connection.entries) > 0
|
||||
|
||||
|
||||
def get_user(connection: Connection, uid: str) -> User:
|
||||
|
|
Loading…
Add table
Reference in a new issue