mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	Fixed #2826 -- Added .is_authenticated() check before login() in comments views
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3929 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -217,7 +217,7 @@ def post_comment(request): | ||||
|     errors = manipulator.get_validation_errors(new_data) | ||||
|     # If user gave correct username/password and wasn't already logged in, log them in | ||||
|     # so they don't have to enter a username/password again. | ||||
|     if manipulator.get_user() and new_data.has_key('password') and manipulator.get_user().check_password(new_data['password']): | ||||
|     if manipulator.get_user() and not manipulator.get_user().is_authenticated() and new_data.has_key('password') and manipulator.get_user().check_password(new_data['password']): | ||||
|         from django.contrib.auth import login | ||||
|         login(request, manipulator.get_user()) | ||||
|     if errors or request.POST.has_key('preview'): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user