summaryrefslogtreecommitdiffstats
path: root/modules/auth/sso/oauth2.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/auth/sso/oauth2.go')
-rw-r--r--modules/auth/sso/oauth2.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/sso/oauth2.go b/modules/auth/sso/oauth2.go
index e677490b80..6860c12e39 100644
--- a/modules/auth/sso/oauth2.go
+++ b/modules/auth/sso/oauth2.go
@@ -93,7 +93,7 @@ func (o *OAuth2) userIDFromToken(ctx *macaron.Context) int64 {
}
t, err := models.GetAccessTokenBySHA(tokenSHA)
if err != nil {
- if models.IsErrAccessTokenNotExist(err) || models.IsErrAccessTokenEmpty(err) {
+ if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) {
log.Error("GetAccessTokenBySHA: %v", err)
}
return 0