mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
Add go get meta support
This commit is contained in:
parent
3487f17285
commit
5d4025cb5a
13 changed files with 62 additions and 7 deletions
|
@ -396,6 +396,10 @@ func Activate(ctx *middleware.Context) {
|
|||
} else {
|
||||
ctx.Data["Hours"] = base.Service.ActiveCodeLives / 60
|
||||
mailer.SendActiveMail(ctx.Render, ctx.User)
|
||||
|
||||
if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil {
|
||||
log.Error("Set cache(MailResendLimit) fail: %v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ctx.Data["ServiceNotEnabled"] = true
|
||||
|
@ -451,7 +455,17 @@ func ForgotPasswd(ctx *middleware.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) {
|
||||
ctx.Data["ResendLimited"] = true
|
||||
ctx.HTML(200, "user/forgot_passwd")
|
||||
return
|
||||
}
|
||||
|
||||
mailer.SendResetPasswdMail(ctx.Render, u)
|
||||
if err = ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil {
|
||||
log.Error("Set cache(MailResendLimit) fail: %v", err)
|
||||
}
|
||||
|
||||
ctx.Data["Email"] = email
|
||||
ctx.Data["Hours"] = base.Service.ActiveCodeLives / 60
|
||||
ctx.Data["IsResetSent"] = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue