mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 03:43:12 +00:00
[Users] Archived and Disabled accounts can't reset their passords
This commit is contained in:
parent
a9ec23c260
commit
e4f877bbea
1 changed files with 2 additions and 1 deletions
|
@ -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=[User.STATE_ACTIVE, User.STATE_NOT_YET_ACTIVE],
|
||||||
)
|
)
|
||||||
except User.DoesNotExist:
|
except User.DoesNotExist:
|
||||||
messages.error(request, _("The user doesn't exist."))
|
messages.error(request, _("The user doesn't exist."))
|
||||||
|
|
Loading…
Reference in a new issue