Closed jeffclay closed 7 years ago
Hi,
this could be solved in the latest master version.
With https://github.com/Lucterios2/django_auth_ldap3_ad/commit/45e5e9519908e5ea2f1b87942a8751fa4f9ea79f I changed the user lookup to use the username field from LDAP_ATTRIBUTES_MAP['username']
as value.
But additionally you should set the LDAP_USER_MODEL_USERNAME_FIELD
to identify the field to use for lookup.
hth Seyhbold
Hi,
The last version has be updated in github & pypi. You can now update you module via pip and apply the advice of Seyhbold.
Then, please tell us if that solves you problem or not.
Regards.
Ive got the same error but i fixed it by converting the list to a string
lookup_username = user_attribs[settings.LDAP_ATTRIBUTES_MAP[username_field]]
lookup_username = "".join(lookup_username)
usr = user_model.objects.get(**{"{0}__iexact".format(username_field): lookup_username})
I'm getting the error about a duplicate entry (Duplicate entry 'USERS.NAME' for key 'username') if I try to login after having already logged in once and populated the db with my user name. If I delete the user row from the auto_user table then it will let me log in again.
I've also noticed that none of the AD groups are being created in the django db. I'm not sure if this is expected behavior or not; I'm very new to django.
Here's my config: