Changeset 3257
- Timestamp:
- 07/02/06 21:12:59 (2 years ago)
- Files:
-
- django/trunk/django/contrib/auth/__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/__init__.py
r3226 r3257 28 28 def authenticate(**credentials): 29 29 """ 30 If the given credentials , return a user object.30 If the given credentials are valid, return a User object. 31 31 """ 32 32 for backend in get_backends(): … … 34 34 user = backend.authenticate(**credentials) 35 35 except TypeError: 36 # this backend doesn't accept these credentials as arguments, try the next one.36 # This backend doesn't accept these credentials as arguments. Try the next one. 37 37 continue 38 38 if user is None: 39 39 continue 40 # annotate the user object with the path of the backend40 # Annotate the user object with the path of the backend. 41 41 user.backend = str(backend.__class__) 42 42 return user … … 55 55 def logout(request): 56 56 """ 57 Remove the authenticated user's id fromrequest.57 Remove the authenticated user's ID from the request. 58 58 """ 59 59 del request.session[SESSION_KEY]
