mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Adding email lookup to forgot password flow.
This commit is contained in:
parent
cbd99b7462
commit
6c124c2035
1 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ class Command(BaseCommand):
|
|||
if username:
|
||||
try:
|
||||
user = User.objects.get(username__icontains=username)
|
||||
except User.MultipleObjectsFound:
|
||||
except User.MultipleObjectsReturned:
|
||||
user = User.objects.get(username__iexact=username)
|
||||
except User.DoesNotExist:
|
||||
user = User.objects.get(email__iexact=username)
|
||||
|
@ -24,9 +24,9 @@ class Command(BaseCommand):
|
|||
elif email:
|
||||
try:
|
||||
user = User.objects.get(email__icontains=email)
|
||||
except User.MultipleObjectsFound:
|
||||
except User.MultipleObjectsReturned:
|
||||
user = User.objects.get(email__iexact=email)
|
||||
except User.MultipleObjectsFound:
|
||||
except User.MultipleObjectsReturned:
|
||||
users = User.objects.filter(email__iexact=email)
|
||||
user = users[0]
|
||||
except User.DoesNotExist:
|
||||
|
|
Loading…
Add table
Reference in a new issue