Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Fix #857: allow multiple same-email users
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Gaudard committed Aug 28, 2023
1 parent 76b35ab commit 508c9b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions geocity/apps/accounts/auth_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ def authenticate(self, request, email, password, **kwargs):
if not email or not password:
return None

try:
user = User.objects.get(email=email)
except User.DoesNotExist:
user = User.objects.filter(email=email).first()
if not user:
return None

if user.check_password(password):
Expand Down

0 comments on commit 508c9b9

Please sign in to comment.