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

Add support for login with email/password on the classic login pages #1878

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

DavisRayM
Copy link
Contributor

Changes / Features implemented

  • Add support for using email in place of username when authenticating through the Non-API views

Steps taken to verify this change does what is intended

  • Added tests

Side effects of implementing this change

Closes #1789

@DavisRayM DavisRayM force-pushed the allow-email-login-classic-template branch from 92506fa to bc57393 Compare August 21, 2020 14:06
ivermac
ivermac previously approved these changes Aug 21, 2020
Username is case insensitive. Supports using email in place of username
"""
user = User.objects.filter(
Q(username__iexact=username) | Q(email=username)).first()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also use email__iexact=email, it sometimes is written differently by different people.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, changed this in the latest commit.

@DavisRayM DavisRayM merged commit d80bb18 into master Aug 24, 2020
@DavisRayM DavisRayM deleted the allow-email-login-classic-template branch August 24, 2020 09:26
@DavisRayM DavisRayM mentioned this pull request Aug 25, 2020
2 tasks
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

Successfully merging this pull request may close these issues.

Allow users to sign in using email & password while on classic templates
3 participants