mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 17:36:27 +00:00
Correctly send a confirmation email
This commit is contained in:
parent
8e8d035439
commit
9f1c6a57e2
2 changed files with 3 additions and 3 deletions
|
@ -810,15 +810,15 @@ class User(
|
|||
self.email_state = self.EMAIL_STATE_PENDING
|
||||
|
||||
# Fully archived users shouldn't get an email
|
||||
if self.state != self.STATE_FULL_ARCHIVE:
|
||||
if self.state == self.STATE_FULL_ARCHIVE:
|
||||
return False
|
||||
|
||||
# Always keep the oldest change date
|
||||
if self.email_change_date is None:
|
||||
self.email_change_date = timezone.now()
|
||||
|
||||
self.save()
|
||||
self.confirm_email_address_mail(request)
|
||||
|
||||
return True
|
||||
|
||||
def confirm_email_before_date(self):
|
||||
|
|
|
@ -1069,7 +1069,7 @@ def resend_confirmation_email(request, logged_user, userid):
|
|||
messages.error(request, _("The user doesn't exist."))
|
||||
|
||||
if request.method == "POST":
|
||||
user.send_confirm_email_if_necessary(request)
|
||||
user.confirm_email_address_mail(request)
|
||||
messages.success(request, _("An email to confirm your address was sent."))
|
||||
return redirect(reverse("users:profil", kwargs={"userid": userid}))
|
||||
|
||||
|
|
Loading…
Reference in a new issue