mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 17:10:10 +00:00
invite: auto-append /invite if missing to url_base
This commit is contained in:
parent
412fe31da6
commit
e67b2e91fb
3
email.go
3
email.go
@ -306,6 +306,9 @@ func (emailer *Emailer) confirmationValues(code, username, key string, app *appC
|
|||||||
} else {
|
} else {
|
||||||
message := app.config.Section("messages").Key("message").String()
|
message := app.config.Section("messages").Key("message").String()
|
||||||
inviteLink := app.config.Section("invite_emails").Key("url_base").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)
|
inviteLink = fmt.Sprintf("%s/%s?key=%s", inviteLink, code, key)
|
||||||
template["helloUser"] = emailer.lang.Strings.template("helloUser", tmpl{"username": username})
|
template["helloUser"] = emailer.lang.Strings.template("helloUser", tmpl{"username": username})
|
||||||
template["confirmationURL"] = inviteLink
|
template["confirmationURL"] = inviteLink
|
||||||
|
Loading…
Reference in New Issue
Block a user