diff options
author | puffybsd <puffybsd@yahoo.com> | 2017-02-23 20:37:13 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-24 09:37:13 +0800 |
commit | 8de8e11487ebd729d026c8a71adfa9ea6b926a69 (patch) | |
tree | c64dd54ac9a2d0c81551865b8d0c7af2448aaa26 /routers/install.go | |
parent | 832477b1bceb003ce12529c7797a53e80c936d58 (diff) | |
download | gitea-8de8e11487ebd729d026c8a71adfa9ea6b926a69.tar.gz gitea-8de8e11487ebd729d026c8a71adfa9ea6b926a69.zip |
Fixes 1019, install page SMTP user is required to (#1020)
to be an email address.
Signed-off-by: P.B. <puffybsd@yahoo.com>
Diffstat (limited to 'routers/install.go')
-rw-r--r-- | routers/install.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/install.go b/routers/install.go index 664489570c..b4df536d0c 100644 --- a/routers/install.go +++ b/routers/install.go @@ -99,7 +99,7 @@ func Install(ctx *context.Context) { if setting.MailService != nil { form.SMTPHost = setting.MailService.Host form.SMTPFrom = setting.MailService.From - form.SMTPEmail = setting.MailService.User + form.SMTPUser = setting.MailService.User } form.RegisterConfirm = setting.Service.RegisterEmailConfirm form.MailNotify = setting.Service.EnableNotifyMail @@ -124,7 +124,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { ctx.Data["CurDbOption"] = form.DbType if ctx.HasError() { - if ctx.HasValue("Err_SMTPEmail") { + if ctx.HasValue("Err_SMTPUser") { ctx.Data["Err_SMTP"] = true } if ctx.HasValue("Err_AdminName") || @@ -279,7 +279,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { cfg.Section("mailer").Key("ENABLED").SetValue("true") cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost) cfg.Section("mailer").Key("FROM").SetValue(form.SMTPFrom) - cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail) + cfg.Section("mailer").Key("USER").SetValue(form.SMTPUser) cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd) } else { cfg.Section("mailer").Key("ENABLED").SetValue("false") |