summaryrefslogtreecommitdiff
path: root/django/contrib/auth/models.py
diff options
context:
space:
mode:
authorlevental <levental@fh-brandenburg.de>2016-09-19 14:55:18 +0200
committerTim Graham <timograham@gmail.com>2016-09-27 11:59:00 -0400
commit617e36dc1ede2a311dfd03f18432b31cbfe4c0f7 (patch)
tree38fd43fc044ff923321b444c292686798dfb17bd /django/contrib/auth/models.py
parentf7e91cac689b28fc32ca52cdeac258ec0d58b4fc (diff)
Fixed #20705 -- Allowed using PasswordResetForm with user models with an email field not named 'email'.
Diffstat (limited to 'django/contrib/auth/models.py')
-rw-r--r--django/contrib/auth/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index e62307a0a7..eef38c17ee 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -333,6 +333,7 @@ class AbstractUser(AbstractBaseUser, PermissionsMixin):
objects = UserManager()
+ EMAIL_FIELD = 'email'
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = ['email']