Resend the activation email.
"""
- if request.user["email_verified"]:
+ if request.user is None:
messages.add_message(
request,
messages.ERROR,
- _("You've already verified your email address!"))
+ _('You must be logged in so we know who to send the email to!'))
- return redirect(request, "mediagoblin.user_pages.user_home", user=request.user['username'])
+ return redirect(request, "/auth/login")
- if request.user is None:
+ if request.user["email_verified"]:
messages.add_message(
request,
messages.ERROR,
- _('You must be logged in so we know who to send the email to!'))
+ _("You've already verified your email address!"))
- return redirect(request, "/auth/login")
+ return redirect(request, "mediagoblin.user_pages.user_home", user=request.user['username'])
request.user[u'verification_key'] = unicode(uuid.uuid4())
request.user.save()