1
0
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:
Jaap Roes 2024-06-25 17:09:30 +02:00 committed by GitHub
parent bcc327aa32
commit e46dac3201
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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):