Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2224 from bookwyrm-social/email-not-found-text
Remove error reporting on resend to invalid email address
  • Loading branch information
mouse-reeve committed Jul 14, 2022
2 parents 44b86ba + 6972843 commit aa57960
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions bookwyrm/templates/confirm_email/resend_modal.html
Expand Up @@ -19,16 +19,8 @@
name="email"
class="input"
id="email"
aria-described-by="id_email_errors"
required
>
{% if error %}
<div id="id_email_errors">
<p class="help is-danger">
{% trans "No user matching this email address found." %}
</p>
</div>
{% endif %}
</div>
</div>
{% endblock %}
Expand Down
8 changes: 4 additions & 4 deletions bookwyrm/views/landing/register.py
Expand Up @@ -134,19 +134,19 @@ def post(self, request):
class ResendConfirmEmail(View):
"""you probably didn't get the email because celery is slow but you can try this"""

def get(self, request, error=False):
def get(self, request):
"""resend link landing page"""
return TemplateResponse(request, "confirm_email/resend.html", {"error": error})
return TemplateResponse(request, "confirm_email/resend.html")

def post(self, request):
"""resend confirmation link"""
email = request.POST.get("email")
try:
user = models.User.objects.get(email=email)
emailing.email_confirmation_email(user)
except models.User.DoesNotExist:
return self.get(request, error=True)
pass

emailing.email_confirmation_email(user)
return TemplateResponse(
request, "confirm_email/confirm_email.html", {"valid": True}
)

0 comments on commit aa57960

Please sign in to comment.