diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-30 10:47:08 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-30 10:47:08 -0400 |
commit | a6e12aaef6344fff43745baa755c6afa11935550 (patch) | |
tree | 85d6320a9917cdb7efdea39b4b85cf1c36aa5b52 /modules | |
parent | 03cc39ea121e87febf4421d84e579770f635695c (diff) | |
download | gitea-a6e12aaef6344fff43745baa755c6afa11935550.tar.gz gitea-a6e12aaef6344fff43745baa755c6afa11935550.zip |
Fixing bug
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/user.go | 4 |
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 |