We should redirect after verify_email to the user's homepage
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 31 Jul 2011 20:09:52 +0000 (15:09 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 31 Jul 2011 20:09:52 +0000 (15:09 -0500)
mediagoblin/auth/views.py

index fb5db8704d58d56ff58a1a412510c42280693461..df7e2a88c64d120c3c47f8754e01ce2ec86c1d3f 100644 (file)
@@ -145,23 +145,19 @@ def verify_email(request):
         user['status'] = u'active'
         user['email_verified'] = True
         user.save()
-        verification_successful = True
         messages.add_message(
             request,
             messages.SUCCESS,
             ('Your email address has been verified. '
              'You may now login, edit your profile, and submit images!'))
     else:
-        verification_successful = False
         messages.add_message(request,
                              messages.ERROR,
                             'The verification key or user id is incorrect')
 
-    return render_to_response(
-        request,
-        'mediagoblin/user_pages/user.html',
-        {'user': user,
-        'verification_successful' : verification_successful})
+    return redirect(
+        request, 'mediagoblin.user_pages.user_home',
+        user=request.user['username'])
 
 
 def resend_activation(request):