Ticket #5422: 0001-Fix-issue-5422-Resend-verification-fails.patch

File 0001-Fix-issue-5422-Resend-verification-fails.patch, 1.1 KB (added by ayleph, 8 years ago)
  • mediagoblin/auth/views.py

    From 996613eb1177c5f0a122d81f45bfd70a8f1eb84d Mon Sep 17 00:00:00 2001
    From: Andrew Browning <ayleph@thisshitistemp.com>
    Date: Sun, 21 Feb 2016 17:49:53 -0500
    Subject: [PATCH] Fix issue 5422 Resend verification fails
    
    If a user was logged in and already verified, the resend_verification
    link would cause a server error. This fix addresses that by using the
    correct syntax to query the username from the request.
    ---
     mediagoblin/auth/views.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py
    index 03a46f7..2f95fd8 100644
    a b def resend_activation(request):  
    195195            messages.ERROR,
    196196            _("You've already verified your email address!"))
    197197
    198         return redirect(request, "mediagoblin.user_pages.user_home", user=request.user['username'])
     198        return redirect(request, "mediagoblin.user_pages.user_home", user=request.user.username)
    199199
    200200    email_debug_message(request)
    201201    send_verification_email(request.user, request)