8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +00:00

[Users] Archive and Disabled accounts can't reset their passords

This commit is contained in:
Maxime Bombar 2018-10-31 12:45:04 +01:00
parent a9ec23c260
commit 8f23bada4b

View file

@ -1034,7 +1034,8 @@ def reset_password(request):
try: try:
user = User.objects.get( user = User.objects.get(
pseudo=userform.cleaned_data['pseudo'], pseudo=userform.cleaned_data['pseudo'],
email=userform.cleaned_data['email'] email=userform.cleaned_data['email'],
state__in=[0,3],
) )
except User.DoesNotExist: except User.DoesNotExist:
messages.error(request, _("The user doesn't exist.")) messages.error(request, _("The user doesn't exist."))