Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Clarified meaning of models.User.is_authenticated()

Backport of f96fe3c from master
  • Loading branch information...
commit d8dc2b123d31f309ced3d29b6c7467531619c7ae 1 parent bf55bbd
@jaimeirurzun jaimeirurzun authored timgraham committed
Showing with 7 additions and 5 deletions.
  1. +7 −5 docs/ref/contrib/auth.txt
View
12 docs/ref/contrib/auth.txt
@@ -114,11 +114,13 @@ Methods
Always returns ``True`` (as opposed to
``AnonymousUser.is_authenticated()`` which always returns ``False``).
This is a way to tell if the user has been authenticated. This does not
- imply any permissions, and doesn't check if the user is active - it
- only indicates that ``request.user`` has been populated by the
- :class:`~django.contrib.auth.middleware.AuthenticationMiddleware` with
- a :class:`~django.contrib.auth.models.User` object representing the
- currently logged-in user.
+ imply any permissions, and doesn't check if the user is active or has
+ a valid session. Even though normally you will call this method on
+ ``request.user`` to find out whether it has been populated by the
+ :class:`~django.contrib.auth.middleware.AuthenticationMiddleware`
+ (representing the currently logged-in user), you should know this method
+ returns ``True`` for any :class:`~django.contrib.auth.models.User`
+ instance.
.. method:: get_full_name()
Please sign in to comment.
Something went wrong with that request. Please try again.