diff options
Diffstat (limited to 'services/auth/source/db/authenticate.go')
-rw-r--r-- | services/auth/source/db/authenticate.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/auth/source/db/authenticate.go b/services/auth/source/db/authenticate.go index e73ab15d28..af7b719a63 100644 --- a/services/auth/source/db/authenticate.go +++ b/services/auth/source/db/authenticate.go @@ -6,6 +6,7 @@ package db import ( "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/setting" ) @@ -24,7 +25,7 @@ func Authenticate(user *models.User, login, password string) (*models.User, erro if err := user.SetPassword(password); err != nil { return nil, err } - if err := models.UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { + if err := models.UpdateUserCols(db.DefaultContext, user, "passwd", "passwd_hash_algo", "salt"); err != nil { return nil, err } } |