diff options
author | Unknwon <u@gogs.io> | 2015-09-13 11:07:21 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-13 11:07:21 -0400 |
commit | 83e747bfda43c2c8fa0aceb2c989d42fe5ca1582 (patch) | |
tree | 1dfee9128010bb08ad2177c24fd1c5c8c53d45cd /routers/user/auth.go | |
parent | e5ed5904c62d9a618cb6f4ad852b021a02c3481e (diff) | |
download | gitea-83e747bfda43c2c8fa0aceb2c989d42fe5ca1582.tar.gz gitea-83e747bfda43c2c8fa0aceb2c989d42fe5ca1582.zip |
#697 and #1606 and new admin edit user UI
Diffstat (limited to 'routers/user/auth.go')
-rw-r--r-- | routers/user/auth.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index 1b15d90eb7..6694e7e8f3 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -151,7 +151,7 @@ func oauthSignUp(ctx *middleware.Context, sid int64) { func SignUp(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("sign_up") - ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha if setting.Service.DisableRegistration { ctx.Data["DisableRegistration"] = true @@ -170,7 +170,7 @@ func SignUp(ctx *middleware.Context) { func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.RegisterForm) { ctx.Data["Title"] = ctx.Tr("sign_up") - ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha if setting.Service.DisableRegistration { ctx.Error(403) @@ -188,7 +188,7 @@ func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.Registe return } - if !setting.Service.DisableCaptcha && !cpt.VerifyReq(ctx.Req) { + if setting.Service.EnableCaptcha && !cpt.VerifyReq(ctx.Req) { ctx.Data["Err_Captcha"] = true ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), SIGNUP, &form) return |