Browse Source

optimization of secure register

pull/213/head
lewis 3 years ago
parent
commit
2c93a0a029
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      routers/secure/user.go

+ 8
- 0
routers/secure/user.go View File

@@ -119,6 +119,14 @@ func CreateUser(ctx *context.Context, form api.CreateUserOption) {
return return
} }


// Send confirmation email
if setting.Service.RegisterEmailConfirm{
mailer.SendActivateAccountMail(ctx.Locale, u)
if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil {
log.Error("Set cache(MailResendLimit) fail: %v", err)
}
}

log.Trace("Account created (%s): %s", ctx.User.Name, u.Name, ctx.Data["MsgID"]) log.Trace("Account created (%s): %s", ctx.User.Name, u.Name, ctx.Data["MsgID"])


// Send email notification. // Send email notification.


Loading…
Cancel
Save