summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-09-21 16:03:18 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-09-21 16:03:18 -0700
commitdda30e407aca321f369f27078076d3e05fd28b19 (patch)
tree1210d0ae8969c3e51918cd0ccab425e458f3c278 /web/web.go
parentee5a77ec56ee13f5eb96fce6065b4b7a1845de89 (diff)
downloadchat-dda30e407aca321f369f27078076d3e05fd28b19.tar.gz
chat-dda30e407aca321f369f27078076d3e05fd28b19.tar.bz2
chat-dda30e407aca321f369f27078076d3e05fd28b19.zip
Added confirmation when users request another verification email; users are no longer redirected after requesting another verification email
Diffstat (limited to 'web/web.go')
-rw-r--r--web/web.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/web.go b/web/web.go
index 305e4f199..b204708b0 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
}
}