8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +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 Jean-Romain Garnier
parent ede81adaf7
commit 55cde72512

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"))