From 30667eb259ea69d92908dc78f65ae8f0aaf53a79 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 17 Apr 2020 18:29:22 +0200 Subject: [PATCH] Set email_change_date on user creation --- users/forms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/users/forms.py b/users/forms.py index a29c1fbe..d7c3c15b 100644 --- a/users/forms.py +++ b/users/forms.py @@ -518,6 +518,7 @@ class AdherentCreationForm(AdherentForm): an email to init the password should be sent""" # Save the provided password in hashed format user = super(AdherentForm, self).save(commit=False) + user.email_change_date = timezone.now() is_set_password_allowed = OptionalUser.get_cached_value("allow_set_password_during_user_creation") send_email = not is_set_password_allowed or self.cleaned_data.get("init_password_by_mail")