mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 03:29:43 +02:00
Fix bug when the linked account was disactived and list the linked accounts (#29263)
The bug has been fixed on v1.22 but not backport to v1.21. This original PR have many refactors so I don't think it's necessary to backport all of them. Fix #28667
This commit is contained in:
1 parent
5b8b22bd75
commit
e2eac7574f
5 files changed
+16
-13
No files matched your search
@@ -146,7 +146,7 @@ func SignIn(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers()
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetOAuth2ProvidersMap(true)
|
||||
if err != nil {
|
||||
ctx.ServerError("UserSignIn", err)
|
||||
return
|
||||
@@ -170,7 +170,7 @@ func SignIn(ctx *context.Context) {
|
||||
func SignInPost(ctx *context.Context) {
|
||||
ctx.Data["Title"] = ctx.Tr("sign_in")
|
||||
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers()
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetOAuth2ProvidersMap(true)
|
||||
if err != nil {
|
||||
ctx.ServerError("UserSignIn", err)
|
||||
return
|
||||
@@ -392,7 +392,7 @@ func SignUp(ctx *context.Context) {
|
||||
|
||||
ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up"
|
||||
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers()
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetOAuth2ProvidersMap(true)
|
||||
if err != nil {
|
||||
ctx.ServerError("UserSignUp", err)
|
||||
return
|
||||
@@ -422,7 +422,7 @@ func SignUpPost(ctx *context.Context) {
|
||||
|
||||
ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up"
|
||||
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers()
|
||||
orderedOAuth2Names, oauth2Providers, err := oauth2.GetOAuth2ProvidersMap(true)
|
||||
if err != nil {
|
||||
ctx.ServerError("UserSignUp", err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user