summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/auth/user.go b/modules/auth/user.go
index cb8db1b29a..6242a11c18 100644
--- a/modules/auth/user.go
+++ b/modules/auth/user.go
@@ -21,6 +21,10 @@ import (
// SignedInId returns the id of signed in user.
func SignedInId(session session.SessionStore) int64 {
+ if !models.HasEngine {
+ return 0
+ }
+
userId := session.Get("userId")
if userId == nil {
return 0