From 8e0a69f86a9e103d1d82d3c5000e01b4e2570a51 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 13 Sep 2015 09:51:51 -0400 Subject: #697 disable captcha and new admin create user UI --- modules/middleware/auth.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/middleware') diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index 68d74e87..4f92c8f8 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -27,6 +27,10 @@ type ToggleOptions struct { // AutoSignIn reads cookie and try to auto-login. func AutoSignIn(ctx *Context) (bool, error) { + if !models.HasEngine { + return false, nil + } + uname := ctx.GetCookie(setting.CookieUserName) if len(uname) == 0 { return false, nil -- cgit v1.2.3