diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-21 00:53:46 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-21 00:53:46 -0400 |
commit | 9d2cef23f2af273933da8f1cef150c1d163be5ee (patch) | |
tree | 0bf5cb25485b29407b93655ef00e4313efcc7276 /modules | |
parent | ad5ec45dd63aa2563d113e6a9ce31180246aa5f2 (diff) | |
download | gitea-9d2cef23f2af273933da8f1cef150c1d163be5ee.tar.gz gitea-9d2cef23f2af273933da8f1cef150c1d163be5ee.zip |
Fix #165
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/user.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/auth/user.go b/modules/auth/user.go index fdbba31af5..284a4644de 100644 --- a/modules/auth/user.go +++ b/modules/auth/user.go @@ -25,7 +25,11 @@ func SignedInId(header http.Header, sess session.SessionStore) int64 { return 0 } - id, _ := base.StrTo(header.Get(setting.ReverseProxyAuthUid)).Int64() + var id int64 + if setting.Service.EnableReverseProxyAuth { + id, _ = base.StrTo(header.Get(setting.ReverseProxyAuthUid)).Int64() + } + if id <= 0 { uid := sess.Get("userId") if uid == nil { |