ldapcherry icon indicating copy to clipboard operation
ldapcherry copied to clipboard

Modify user raises ldap.ALREADY_EXIST

Open polmic opened this issue 5 years ago • 0 comments

Hi everyone,

I had an issue with the modify user feature (not self modify).

When updating a user, an error ldap.ALREADY_EXIST is raised, this is because in the function set_attrs (file backend_ldap.py l480) the test to see if we are trying to update the username is failing. So we try to update the uid, with the same uid, raising an error

I changed this test a bit from if attr.lower() == self.dn_user_attr.lower(): to : if attr.lower() == self.dn_user_attr.lower() and old_attrs[attr][0] != attrs[attr]:

I am not making a pr as i know that this can be improved. Im posting this as an issue to let you know about it and the way i solved it.

Cheers

polmic avatar Mar 06 '20 11:03 polmic