-
Notifications
You must be signed in to change notification settings - Fork 24
Redirect to login when email is already verifyed. #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@incuna/backend please review / merge |
a27352f
to
33e7185
Compare
Redirect to the login when attempting to verify an email address that is already verified.
33e7185
to
14572c2
Compare
self.activate_user() | ||
if not self.already_verified: | ||
self.activate_user() | ||
messages.success(request, self.success_message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should messages.success
only be set if the user has not been verified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success_message
gets set to already_verified_message
('Your email is already confirmed.') if they are
already_verified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, I thought we were going down the path of calling messages.success
twice.
@kevinetienne happy to merge? |
Redirect to the login when attempting to verify an email address that is already verified.
This avoids presenting the user with a
403 Forbidden
error when the they click the email verification link a second time.