mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Invite redemption error if user had already redeemed (#19070)
When opening the invite acceptance page when the user was already logged in, we were still showing the Accept Invitation prompt even if the user had already redeemed the invitation and was present in the `InvitedUser` table. This would lead to errors when the user clicked on the button. This commit fixes the issue by hiding the Accept Invitation button and showing an error message instead indicating that the user had already redeemed the invitation. This only applies to multi-use invite links.
This commit is contained in:
@@ -2097,7 +2097,6 @@ en:
|
||||
name_label: "Name"
|
||||
password_label: "Password"
|
||||
existing_user_can_redeem: "Redeem your invitation to a topic or group."
|
||||
existing_user_cannot_redeem: "This invitation cannot be redeemed. Please ask the person who invited you to send you a new invitation."
|
||||
|
||||
password_reset:
|
||||
continue: "Continue to %{site_name}"
|
||||
|
||||
@@ -250,6 +250,8 @@ en:
|
||||
<p>Otherwise please <a href="%{base_url}/password-reset">Reset Password</a>.</p>
|
||||
not_found_template_link: |
|
||||
<p>This invitation to <a href="%{base_url}">%{site_name}</a> can no longer be redeemed. Please ask the person who invited you to send you a new invitation.</p>
|
||||
existing_user_cannot_redeem: "This invitation cannot be redeemed. Please ask the person who invited you to send you a new invitation."
|
||||
existing_user_already_redemeed: "You have already redeemed this invite link."
|
||||
user_exists: "There's no need to invite <b>%{email}</b>, they already have an account!"
|
||||
invite_exists: "You already invited <b>%{email}</b>."
|
||||
invalid_email: "%{email} isn't a valid email address."
|
||||
|
||||
Reference in New Issue
Block a user