Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify user raises ldap.ALREADY_EXIST #61

Open
polmic opened this issue Mar 6, 2020 · 0 comments
Open

Modify user raises ldap.ALREADY_EXIST #61

polmic opened this issue Mar 6, 2020 · 0 comments

Comments

@polmic
Copy link

polmic commented Mar 6, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant