mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Always send confirmation email, except for fully-archived users
This commit is contained in:
parent
1ee4d91721
commit
e169b51759
1 changed files with 4 additions and 3 deletions
|
@ -807,15 +807,16 @@ class User(
|
||||||
if self.__original_email == self.email:
|
if self.__original_email == self.email:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Archived users shouldn't get an email
|
self.email_state = self.EMAIL_STATE_PENDING
|
||||||
if self.state not in [self.STATE_ACTIVE, self.STATE_DISABLED, self.STATE_NOT_YET_ACTIVE]:
|
|
||||||
|
# Fully archived users shouldn't get an email
|
||||||
|
if self.state != self.STATE_FULL_ARCHIVE:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Always keep the oldest change date
|
# Always keep the oldest change date
|
||||||
if self.email_change_date is None:
|
if self.email_change_date is None:
|
||||||
self.email_change_date = timezone.now()
|
self.email_change_date = timezone.now()
|
||||||
|
|
||||||
self.email_state = self.EMAIL_STATE_PENDING
|
|
||||||
self.confirm_email_address_mail(request)
|
self.confirm_email_address_mail(request)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue