mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #24987 -- Allowed inactive users to login with the test client.
This commit is contained in:
committed by
Tim Graham
parent
e0a3d93730
commit
107165c4b0
@@ -599,8 +599,7 @@ class Client(RequestFactory):
|
||||
"""
|
||||
from django.contrib.auth import authenticate
|
||||
user = authenticate(**credentials)
|
||||
if (user and user.is_active and
|
||||
apps.is_installed('django.contrib.sessions')):
|
||||
if user and apps.is_installed('django.contrib.sessions'):
|
||||
self._login(user)
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user