#27053: Document django.contrib.auth.get_user()
--------------------------------------+--------------------
Reporter: marfire | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
Essentially all the work of `AuthenticationMiddleware` is done by
[https://github.com/django/django/blob/b387189d86aa6f0b8dd5e9ff2facb725e6beb7a9/django/contrib/auth/__init__.py#L172
django.contrib.auth.get_user()]. For anyone who wants to customize this
behavior (for example, fetching users on some requests but not others),
then, this function is very helpful. It deals properly with error
conditions and edge cases, and is what implements
[https://docs.djangoproject.com/en/dev/topics/auth/default/#session-
invalidation-on-password-change session invalidation on password change].
For that reason, I think this function should be documented and become a
first-class part of the API.
--
Ticket URL: <https://code.djangoproject.com/ticket/27053>
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/050.76c1bcab3e2aeabbbd18331662902829%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.