From ba7fe6e035b95fe666aadfc9f8bf2708db281de8 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 17 Apr 2020 18:16:21 +0200 Subject: [PATCH] Automatically validate superuer's email address --- users/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/models.py b/users/models.py index b658e9ef..f6b9387e 100755 --- a/users/models.py +++ b/users/models.py @@ -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)