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

Confirm email after resetting password

This commit is contained in:
Jean-Romain Garnier 2020-04-17 19:59:25 +02:00 committed by Gabriel Detraz
parent dc235b363c
commit b43bbf9d98

View file

@ -1025,8 +1025,10 @@ def process_passwd(request, req):
u_form = PassForm(request.POST or None, instance=user, user=request.user)
if u_form.is_valid():
with transaction.atomic(), reversion.create_revision():
user.confirm_mail()
u_form.save()
reversion.set_comment("Password reset")
req.delete()
messages.success(request, _("The password was changed."))
return redirect(reverse("index"))