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

Authentication fails when using a custom user model #14

Closed
alandmoore opened this issue Jan 20, 2016 · 1 comment
Closed

Authentication fails when using a custom user model #14

alandmoore opened this issue Jan 20, 2016 · 1 comment
Labels

Comments

@alandmoore
Copy link
Contributor

django_auth_ldap3 fails when trying to authenticate in an app that uses a custom user model (in my case, by subclassing AbstractUser and setting AUTH_USER_MODEL to the new class).

The solution (at least in django 1.8 and higher) is to use django.contrib.auth.get_user_model() to determine the model to use, rather than directly importing User.

I will make a pull request shortly with a patch.

@sjkingo
Copy link
Owner

sjkingo commented Jan 20, 2016

Ohh I didn't even think of that. Thanks Alan.

I think we should look at dropping support for 1.6 and 1.7 now that 1.8 is the new LTS and <1.8 is unsupported. I'll open an issue for that. (edit: #15)

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

No branches or pull requests

2 participants