summaryrefslogtreecommitdiffstats
path: root/routers/web/auth/openid.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/auth/openid.go')
-rw-r--r--routers/web/auth/openid.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/auth/openid.go b/routers/web/auth/openid.go
index 3012d8c5a5..32ae91da47 100644
--- a/routers/web/auth/openid.go
+++ b/routers/web/auth/openid.go
@@ -217,7 +217,7 @@ func signInOpenIDVerify(ctx *context.Context) {
}
if u == nil && nickname != "" {
- u, _ = user_model.GetUserByName(nickname)
+ u, _ = user_model.GetUserByName(ctx, nickname)
if err != nil {
if !user_model.IsErrUserNotExist(err) {
ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{
@@ -307,7 +307,7 @@ func ConnectOpenIDPost(ctx *context.Context) {
// add OpenID for the user
userOID := &user_model.UserOpenID{UID: u.ID, URI: oid}
- if err = user_model.AddUserOpenID(userOID); err != nil {
+ if err = user_model.AddUserOpenID(ctx, userOID); err != nil {
if user_model.IsErrOpenIDAlreadyUsed(err) {
ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplConnectOID, &form)
return
@@ -434,7 +434,7 @@ func RegisterOpenIDPost(ctx *context.Context) {
// add OpenID for the user
userOID := &user_model.UserOpenID{UID: u.ID, URI: oid}
- if err = user_model.AddUserOpenID(userOID); err != nil {
+ if err = user_model.AddUserOpenID(ctx, userOID); err != nil {
if user_model.IsErrOpenIDAlreadyUsed(err) {
ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplSignUpOID, &form)
return