diff options
Diffstat (limited to 'routers/web/user/auth_openid.go')
-rw-r--r-- | routers/web/user/auth_openid.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/routers/web/user/auth_openid.go b/routers/web/user/auth_openid.go index e6ad6fef4c..4724a7b431 100644 --- a/routers/web/user/auth_openid.go +++ b/routers/web/user/auth_openid.go @@ -10,6 +10,7 @@ import ( "net/url" "code.gitea.io/gitea/models" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/auth/openid" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -302,9 +303,9 @@ func ConnectOpenIDPost(ctx *context.Context) { } // add OpenID for the user - userOID := &models.UserOpenID{UID: u.ID, URI: oid} - if err = models.AddUserOpenID(userOID); err != nil { - if models.IsErrOpenIDAlreadyUsed(err) { + userOID := &user_model.UserOpenID{UID: u.ID, URI: oid} + if err = user_model.AddUserOpenID(userOID); err != nil { + if user_model.IsErrOpenIDAlreadyUsed(err) { ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplConnectOID, &form) return } @@ -430,9 +431,9 @@ func RegisterOpenIDPost(ctx *context.Context) { } // add OpenID for the user - userOID := &models.UserOpenID{UID: u.ID, URI: oid} - if err = models.AddUserOpenID(userOID); err != nil { - if models.IsErrOpenIDAlreadyUsed(err) { + userOID := &user_model.UserOpenID{UID: u.ID, URI: oid} + if err = user_model.AddUserOpenID(userOID); err != nil { + if user_model.IsErrOpenIDAlreadyUsed(err) { ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplSignUpOID, &form) return } |