From 8f23bada4b7c01d4bf1322977ee12beec997ee49 Mon Sep 17 00:00:00 2001 From: Maxime Bombar Date: Wed, 31 Oct 2018 12:45:04 +0100 Subject: [PATCH] [Users] Archive and Disabled accounts can't reset their passords --- users/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/users/views.py b/users/views.py index e3060105..9a6baa21 100644 --- a/users/views.py +++ b/users/views.py @@ -1034,7 +1034,8 @@ def reset_password(request): try: user = User.objects.get( pseudo=userform.cleaned_data['pseudo'], - email=userform.cleaned_data['email'] + email=userform.cleaned_data['email'], + state__in=[0,3], ) except User.DoesNotExist: messages.error(request, _("The user doesn't exist."))