diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 92123956fd..4d4d489bbc 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -10,12 +10,14 @@ export default class EmailVerify extends React.Component { this.state = {}; } handleResend() { - window.location.href = window.location.href + '&resend=true'; + const newAddress = window.location.href.replace('?resend_success=true', '').replace('&resend_success=true', ''); + window.location.href = newAddress + '&resend=true'; } render() { var title = ''; var body = ''; var resend = ''; + let resendConfirm = ''; if (this.props.isVerified === 'true') { title = global.window.config.SiteName + ' Email Verified'; body =

Your email has been verified! Click -1) { + resendConfirm =


{' Verification email sent.'}

; + } } return ( @@ -41,6 +46,7 @@ export default class EmailVerify extends React.Component {
{body} {resend} + {resendConfirm}
diff --git a/web/web.go b/web/web.go index 305e4f1999..b204708b01 100644 --- a/web/web.go +++ b/web/web.go @@ -375,7 +375,10 @@ func verifyEmail(c *api.Context, w http.ResponseWriter, r *http.Request) { } else { user := result.Data.(*model.User) api.FireAndForgetVerifyEmail(user.Id, user.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) - http.Redirect(w, r, "/", http.StatusFound) + + newAddress := strings.Replace(r.URL.String(), "?resend=true", "?resend_success=true", -1) + newAddress = strings.Replace(newAddress, "&resend=true", "&resend_success=true", -1) + http.Redirect(w, r, newAddress, http.StatusFound) return } }