mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 01:16:27 +00:00
Automatically validate superuer's email address
This commit is contained in:
parent
2a068a7e0a
commit
ba7fe6e035
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue