8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-09-12 01:03:09 +00:00

Automatically consider email valid when user is set to STATE_ACTIVE

This commit is contained in:
Jean-Romain Garnier 2020-04-17 12:50:22 +02:00 committed by Jean-Romain Garnier
parent 32a7c80133
commit bd153d53b2

View file

@ -654,16 +654,15 @@ class User(
and self.state == self.STATE_FULL_ARCHIVE
):
self.full_archive()
elif (
self.__original_state == self.STATE_EMAIL_NOT_YET_CONFIRMED
and self.state not in [self.STATE_EMAIL_NOT_YET_CONFIRMED, self.STATE_DISABLED]
):
self.email_change_date = None
elif (
self.__original_state != self.STATE_EMAIL_NOT_YET_CONFIRMED
and self.state == self.STATE_EMAIL_NOT_YET_CONFIRMED
):
self.email_change_date = timezone.now()
elif (
self.state == self.STATE_ACTIVE
):
self.email_change_date = None
def ldap_sync(
self, base=True, access_refresh=True, mac_refresh=True, group_refresh=False