invite: auto-append /invite if missing to url_base

pull/163/head
Harvey Tindall 3 years ago
parent 412fe31da6
commit e67b2e91fb
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -306,6 +306,9 @@ func (emailer *Emailer) confirmationValues(code, username, key string, app *appC
} else {
message := app.config.Section("messages").Key("message").String()
inviteLink := app.config.Section("invite_emails").Key("url_base").String()
if !strings.HasSuffix(inviteLink, "/invite") {
inviteLink += "/invite"
}
inviteLink = fmt.Sprintf("%s/%s?key=%s", inviteLink, code, key)
template["helloUser"] = emailer.lang.Strings.template("helloUser", tmpl{"username": username})
template["confirmationURL"] = inviteLink

Loading…
Cancel
Save