#23011: Getting user ID from a request shouldn't hit the database
---------------------------------+--------------------------------------
Reporter: BertrandBordage | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by BertrandBordage):
Hum… But isn't `request.session[SESSION_KEY]` (what would be known as
`request.user_id`) created on login and destroyed on logout?
[https://github.com/django/django/blob/11e30b684d1a74bf7cc3b3bd22c0ffbdaa28f0a0/django/contrib/auth/__init__.py#L87
From what I can read in the code], we already check that the user exists
during login.
--
Ticket URL: <https://code.djangoproject.com/ticket/23011#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/073.d942483a6f0277810f51c9a01555dd21%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.