mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Removed superfluous request.user assignment.
`auth.login` sets `request.user`, there is no need to assign `request.user` before calling `auth.login`.
This commit is contained in:
parent
bcc327aa32
commit
e46dac3201
@ -142,9 +142,8 @@ class RemoteUserMiddleware(MiddlewareMixin):
|
||||
# to authenticate the user.
|
||||
user = auth.authenticate(request, remote_user=username)
|
||||
if user:
|
||||
# User is valid. Set request.user and persist user in the session
|
||||
# User is valid. Set request.user and persist user in the session
|
||||
# by logging the user in.
|
||||
request.user = user
|
||||
auth.login(request, user)
|
||||
|
||||
def clean_username(self, username, request):
|
||||
|
Loading…
Reference in New Issue
Block a user