mirror of
https://github.com/django/django.git
synced 2024-12-26 02:56:25 +00:00
Fixed #15322 -- Removed a redundant check in admin logins. Thanks to melinath for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
670f4d9628
commit
127725c560
@ -25,7 +25,7 @@ class AdminAuthenticationForm(AuthenticationForm):
|
|||||||
if username and password:
|
if username and password:
|
||||||
self.user_cache = authenticate(username=username, password=password)
|
self.user_cache = authenticate(username=username, password=password)
|
||||||
if self.user_cache is None:
|
if self.user_cache is None:
|
||||||
if username is not None and u'@' in username:
|
if u'@' in username:
|
||||||
# Mistakenly entered e-mail address instead of username? Look it up.
|
# Mistakenly entered e-mail address instead of username? Look it up.
|
||||||
try:
|
try:
|
||||||
user = User.objects.get(email=username)
|
user = User.objects.get(email=username)
|
||||||
|
Loading…
Reference in New Issue
Block a user