#2332: is_loggedin method for User and AnonymousUser models.
--------------------------+-------------------------------------------------
 Reporter:  SmileyChris   |       Owner:  adrian   
     Type:  enhancement   |      Status:  new      
 Priority:  normal        |   Milestone:           
Component:  Contrib apps  |     Version:           
 Severity:  normal        |    Keywords:  auth user
--------------------------+-------------------------------------------------
 This `is_loggedin` method replaces the `is_anonymous` method.
 
 Discussion from the django-developers group follows
 ([http://groups.google.com/group/django-
 developers/browse_thread/thread/2cc178fe7c8c9046/ see thread]).
 
 Templates treat non-existing variables as False; therefore; a
 request.user somehow failing to get assigned would result in the
 template treating the user as they are authenticated (is_anonymous
 evaluates False).  An is_loggedin would be a more secure option because
 if request.user failed to get assigned, the template would treat the
 user as anonymous.
 
 I would much rather mistakenly treat an authenticated user as anonymous
 than mistakenly treat an anonymous user as authenticated.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2332>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to