8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-28 01:43:46 +00:00

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

This commit is contained in:
Maxime Bombar 2018-10-31 16:17:51 +01:00
parent a9ec23c260
commit e4f877bbea

View file

@ -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=[User.STATE_ACTIVE, User.STATE_NOT_YET_ACTIVE],
)
except User.DoesNotExist:
messages.error(request, _("The user doesn't exist."))