From 9d2cef23f2af273933da8f1cef150c1d163be5ee Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 21 Jun 2014 00:53:46 -0400 Subject: [PATCH] Fix #165 --- modules/auth/user.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/auth/user.go b/modules/auth/user.go index fdbba31af56..284a4644deb 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 {