diff options
Diffstat (limited to 'modules/middleware')
-rw-r--r-- | modules/middleware/auth.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index 68d74e8764..4f92c8f8e3 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 |