8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +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 Gabriel Detraz
parent 2a068a7e0a
commit ba7fe6e035

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)