mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 07:23:46 +00:00
Automatically validate superuer's email address
This commit is contained in:
parent
fb191b4c8e
commit
1e994cc1cc
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ class UserManager(BaseUserManager):
|
|||
)
|
||||
|
||||
user.set_password(password)
|
||||
user.email_change_date = None
|
||||
user.email_state = User.EMAIL_STATE_VERIFIED
|
||||
if su:
|
||||
user.is_superuser = True
|
||||
user.save(using=self._db)
|
||||
|
|
Loading…
Reference in a new issue