Django

Code

Changeset 6805

Show
Ignore:
Timestamp:
12/01/07 13:52:53 (1 year ago)
Author:
ubernostrum
Message:

Fixed #4819: documented the need to call authenticate() before login(), based on a patch from Davd Krauth.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/authentication.txt

    r6743 r6805  
    337337        else: 
    338338            # Return an 'invalid login' error message. 
     339 
     340.. admonition:: Calling ``authenticate()`` first 
     341     
     342    When you're manually logging a user in, you *must* call 
     343    ``authenticate()`` before you call ``login()``; ``authenticate()`` 
     344    sets an attribute on the ``User`` noting which authentication 
     345    backend successfully authenticated that user (see the `backends 
     346    documentation`_ for details), and this information is needed later 
     347    during the login process. 
     348     
     349.. _backends documentation: #other-authentication-sources 
    339350 
    340351Manually checking a user's password