8000
Skip to content

Modify user raises ldap.ALREADY_EXIST #61

@polmic

Description

@polmic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0