1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 20:37:48 +02:00

better behavior if user doesn't exist in one backend

This commit is contained in:
kakwa 2016-07-31 11:39:28 +02:00
parent f21122b219
commit d4235bc33c
3 changed files with 57 additions and 3 deletions

View file

@ -342,6 +342,8 @@ class Backend(ldapcherry.backend.Backend):
""" Set user attributes"""
ldap_client = self._bind()
tmp = self._get_user(self._str(username), ALL_ATTRS)
if tmp is None:
raise UserDoesntExist(username, self.backend_name)
dn = self._str(tmp[0])
old_attrs = tmp[1]
for attr in attrs: