; User need to confirm e-mail for registration
REGISTER_EMAIL_CONFIRM = false
; Does not allow register and admin create account only
-DISENABLE_REGISTERATION = false
+DISABLE_REGISTRATION = false
; User must sign in to view anything.
REQUIRE_SIGNIN_VIEW = false
; Cache avatar as picture
var Service struct {
RegisterEmailConfirm bool
- DisenableRegisteration bool
+ DisableRegistration bool
RequireSignInView bool
EnableCacheAvatar bool
NotifyMail bool
func newService() {
Service.ActiveCodeLives = Cfg.MustInt("service", "ACTIVE_CODE_LIVE_MINUTES", 180)
Service.ResetPwdCodeLives = Cfg.MustInt("service", "RESET_PASSWD_CODE_LIVE_MINUTES", 180)
- Service.DisenableRegisteration = Cfg.MustBool("service", "DISENABLE_REGISTERATION", false)
+ Service.DisableRegistration = Cfg.MustBool("service", "DISABLE_REGISTRATION", false)
Service.RequireSignInView = Cfg.MustBool("service", "REQUIRE_SIGNIN_VIEW", false)
Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false)
}
ctx.Data["Title"] = "Sign Up"
ctx.Data["PageIsSignUp"] = true
- if base.Service.DisenableRegisteration {
- ctx.Data["DisenableRegisteration"] = true
+ if base.Service.DisableRegistration {
+ ctx.Data["DisableRegistration"] = true
ctx.HTML(200, "user/signup")
return
}
ctx.Data["Title"] = "Sign Up"
ctx.Data["PageIsSignUp"] = true
- if base.Service.DisenableRegisteration {
+ if base.Service.DisableRegistration {
ctx.Handle(403, "user.SignUpPost", nil)
return
}
<dl class="dl-horizontal admin-dl-horizontal">
<dt>Register Email Confirmation</dt>
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
- <dt>Disenable Registeration</dt>
- <dd><i class="fa fa{{if .Service.DisenableRegisteration}}-check{{end}}-square-o"></i></dd>
+ <dt>Disable Registration</dt>
+ <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
<dt>Require Sign In View</dt>
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
<dt>Mail Notification</dt>
<div class="container" id="body">
<form action="/user/sign_up" method="post" class="form-horizontal card" id="login-card">
{{.CsrfTokenHtml}}
- {{if .DisenableRegisteration}}
+ {{if .DisableRegistration}}
Sorry, registration has been disabled. Please contact the site administrator.
{{else}}
{{if .IsSocialLogin}}