mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Set email_change_date on user creation
This commit is contained in:
parent
91c031f287
commit
30667eb259
1 changed files with 1 additions and 0 deletions
|
@ -518,6 +518,7 @@ class AdherentCreationForm(AdherentForm):
|
||||||
an email to init the password should be sent"""
|
an email to init the password should be sent"""
|
||||||
# Save the provided password in hashed format
|
# Save the provided password in hashed format
|
||||||
user = super(AdherentForm, self).save(commit=False)
|
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")
|
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")
|
send_email = not is_set_password_allowed or self.cleaned_data.get("init_password_by_mail")
|
||||||
|
|
Loading…
Reference in a new issue