8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +00:00

Automatically validate superuer's email address

This commit is contained in:
Jean-Romain Garnier 2020-04-17 18:16:21 +02:00 committed by Jean-Romain Garnier
parent fb191b4c8e
commit 1e994cc1cc

View file

@ -147,6 +147,8 @@ class UserManager(BaseUserManager):
) )
user.set_password(password) user.set_password(password)
user.email_change_date = None
user.email_state = User.EMAIL_STATE_VERIFIED
if su: if su:
user.is_superuser = True user.is_superuser = True
user.save(using=self._db) user.save(using=self._db)