diff options
Diffstat (limited to 'modules/setting/service.go')
-rw-r--r-- | modules/setting/service.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/setting/service.go b/modules/setting/service.go index 4d03df17a4..5e74641d27 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -17,6 +17,7 @@ var Service struct { ActiveCodeLives int ResetPwdCodeLives int RegisterEmailConfirm bool + RegisterManualConfirm bool EmailDomainWhitelist []string DisableRegistration bool AllowOnlyExternalRegistration bool @@ -63,6 +64,11 @@ func newService() { Service.ResetPwdCodeLives = sec.Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180) Service.DisableRegistration = sec.Key("DISABLE_REGISTRATION").MustBool() Service.AllowOnlyExternalRegistration = sec.Key("ALLOW_ONLY_EXTERNAL_REGISTRATION").MustBool() + if !sec.Key("REGISTER_EMAIL_CONFIRM").MustBool() { + Service.RegisterManualConfirm = sec.Key("REGISTER_EMAIL_CONFIRM").MustBool(false) + } else { + Service.RegisterManualConfirm = false + } Service.EmailDomainWhitelist = sec.Key("EMAIL_DOMAIN_WHITELIST").Strings(",") Service.ShowRegistrationButton = sec.Key("SHOW_REGISTRATION_BUTTON").MustBool(!(Service.DisableRegistration || Service.AllowOnlyExternalRegistration)) Service.ShowMilestonesDashboardPage = sec.Key("SHOW_MILESTONES_DASHBOARD_PAGE").MustBool(true) |