From 7903a14f986b5bf37a45d5ec3b156c21a1cada72 Mon Sep 17 00:00:00 2001 From: Aaron Williamson Date: Mon, 3 Oct 2011 20:25:11 -0400 Subject: [PATCH] Make sure user isn't already verified before resending verification. --- mediagoblin/auth/views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 798fae25..dc4c540b 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -196,6 +196,14 @@ def resend_activation(request): Resend the activation email. """ + if request.user["email_verified"]: + messages.add_message( + request, + messages.ERROR, + _("You've already verified your email address!")) + + return redirect(request, "mediagoblin.user_pages.user_home", user=request.user['username']) + if request.user is None: messages.add_message( request, -- 2.25.1