@secure_required
def email_confirm(request, confirmation_key, template_name='userena/email_confirm_fail.html', success_url=None, extra_context=None):
 user = UserenaSignup.objects.confirm_email(confirmation_key)
 if user:
  if userena_settings.USERENA_USE_MESSAGES:
   messages.success(request, _('Your email address has been changed.'), fail_silently=True)
  if success_url:
   redirect_to = success_url
  else:
   redirect_to = reverse('userena_email_confirm_complete', kwargs={'username': user.username})
  return redirect(redirect_to)
 else:
  if (not extra_context):
   extra_context = dict()
  return ExtraContextTemplateView.as_view(template_name=template_name, extra_context=extra_context)(request)

@ secure_required def email_confirm ( request , confirmation_key , template_name = 'userena/email_confirm_fail.html' , success_url = None , extra_context = None ) : user = UserenaSignup . objects . confirm_email ( confirmation_key ) if user : if userena_settings . USERENA_USE_MESSAGES : messages . success ( request , _ ( 'Your email address has been changed.' ) , fail_silently = True ) if success_url : redirect_to = success_url else : redirect_to = reverse ( 'userena_email_confirm_complete' , kwargs = { 'username' : user . username } ) return redirect ( redirect_to ) else : if ( not extra_context ) : extra_context = dict ( ) return ExtraContextTemplateView . as_view ( template_name = template_name , extra_context = extra_context ) ( request )
confirms an email address with a confirmation key .