diff options
Diffstat (limited to 'modules/auth/auth.go')
-rw-r--r-- | modules/auth/auth.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go index 155a82728c..7e01abc3be 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -55,7 +55,7 @@ func SignedInId(req *http.Request, sess session.Store) int64 { } if id, ok := uid.(int64); ok { if _, err := models.GetUserById(id); err != nil { - if err != models.ErrUserNotExist { + if !models.IsErrUserNotExist(err) { log.Error(4, "GetUserById: %v", err) } return 0 @@ -80,7 +80,7 @@ func SignedInUser(req *http.Request, sess session.Store) (*models.User, bool) { if len(webAuthUser) > 0 { u, err := models.GetUserByName(webAuthUser) if err != nil { - if err != models.ErrUserNotExist { + if !models.IsErrUserNotExist(err) { log.Error(4, "GetUserByName: %v", err) return nil, false } @@ -115,7 +115,7 @@ func SignedInUser(req *http.Request, sess session.Store) (*models.User, bool) { u, err := models.UserSignIn(uname, passwd) if err != nil { - if err != models.ErrUserNotExist { + if !models.IsErrUserNotExist(err) { log.Error(4, "UserSignIn: %v", err) } return nil, false |