mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-15 23:00:10 +00:00
PWR: TrimPrefix instead of Replace for PWR links
This commit is contained in:
parent
953a66ec47
commit
561c461a18
2
email.go
2
email.go
@ -535,7 +535,7 @@ func (emailer *Emailer) resetValues(pwr PasswordReset, app *appContext, noSub bo
|
|||||||
if inviteLink != "" {
|
if inviteLink != "" {
|
||||||
// Strip /invite form end of this URL, ik its ugly.
|
// Strip /invite form end of this URL, ik its ugly.
|
||||||
template["link_reset"] = true
|
template["link_reset"] = true
|
||||||
pinLink := fmt.Sprintf("%s/reset?pin=%s", strings.Replace(inviteLink, "/invite", "", 1), pwr.Pin)
|
pinLink := fmt.Sprintf("%s/reset?pin=%s", strings.TrimPrefix(inviteLink, "/invite"), pwr.Pin)
|
||||||
template["pin"] = pinLink
|
template["pin"] = pinLink
|
||||||
// Only used in html email.
|
// Only used in html email.
|
||||||
template["pin_code"] = pwr.Pin
|
template["pin_code"] = pwr.Pin
|
||||||
|
Loading…
Reference in New Issue
Block a user