summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorBang Dao + Tam Huynh <bang.dao+tam.huynh@eastagile.com>2016-06-16 17:06:59 +0700
committerTim Graham <timograham@gmail.com>2016-06-24 10:37:38 -0400
commit09119dff14ad24d53ac0273e5cd2de24de0b0d81 (patch)
treec3501f95b837ec7c497270adfb369b3ec10f672e /django
parent7e303d15c349401f54761a616acdb20924600da9 (diff)
Fixed #26719 -- Normalized email in AbstractUser.clean().
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index 4812546340..725563424a 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -344,6 +344,10 @@ class AbstractUser(AbstractBaseUser, PermissionsMixin):
verbose_name_plural = _('users')
abstract = True
+ def clean(self):
+ super(AbstractUser, self).clean()
+ self.email = self.__class__.objects.normalize_email(self.email)
+
def get_full_name(self):
"""
Returns the first_name plus the last_name, with a space in between.