mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Merge pull request #2089 from bookwyrm-social/no-confirmation
Show clearer behavior when no email confirmation is needed after all
This commit is contained in:
commit
708dc4d613
1 changed files with 4 additions and 1 deletions
|
@ -91,9 +91,12 @@ class ConfirmEmailCode(View):
|
|||
def get(self, request, code): # pylint: disable=unused-argument
|
||||
"""you got the code! good work"""
|
||||
settings = models.SiteSettings.get()
|
||||
if request.user.is_authenticated or not settings.require_confirm_email:
|
||||
if request.user.is_authenticated:
|
||||
return redirect("/")
|
||||
|
||||
if not settings.require_confirm_email:
|
||||
return redirect("login")
|
||||
|
||||
# look up the user associated with this code
|
||||
try:
|
||||
user = models.User.objects.get(confirmation_code=code)
|
||||
|
|
Loading…
Reference in a new issue