summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-23 12:55:58 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-23 12:55:58 -0700
commit2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160 (patch)
treed5bf8318dc82d96cd34b83481e1cc5c8289d170a /web/web.go
parent9e04909c0a3672d27c148c931d82b225cc86dfe5 (diff)
parent0170cfe604e6cfb430be0b6181243ca85a9ab27b (diff)
downloadchat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.tar.gz
chat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.tar.bz2
chat-2b5b8f95ed9de37a15dc68c38c46a1da2bb1e160.zip
Merge branch 'master' into PLT-11-email
Diffstat (limited to 'web/web.go')
-rw-r--r--web/web.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/web.go b/web/web.go
index afd310af6..3b36f3d56 100644
--- a/web/web.go
+++ b/web/web.go
@@ -355,6 +355,7 @@ func getChannel(c *api.Context, w http.ResponseWriter, r *http.Request) {
func verifyEmail(c *api.Context, w http.ResponseWriter, r *http.Request) {
resend := r.URL.Query().Get("resend")
+ resendSuccess := r.URL.Query().Get("resend_success")
name := r.URL.Query().Get("teamname")
email := r.URL.Query().Get("email")
hashedId := r.URL.Query().Get("hid")
@@ -375,7 +376,9 @@ 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)
+ http.Redirect(w, r, newAddress, http.StatusFound)
return
}
}
@@ -400,6 +403,7 @@ func verifyEmail(c *api.Context, w http.ResponseWriter, r *http.Request) {
page.Props["IsVerified"] = isVerified
page.Props["TeamURL"] = c.GetTeamURLFromTeam(team)
page.Props["UserEmail"] = email
+ page.Props["ResendSuccess"] = resendSuccess
page.Render(c, w)
}