|
|
@ -6,6 +6,7 @@ |
|
|
|
package auth |
|
|
|
package auth |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
"net/http" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
@ -24,6 +25,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/session" |
|
|
|
"code.gitea.io/gitea/modules/session" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/timeutil" |
|
|
|
"code.gitea.io/gitea/modules/timeutil" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/util" |
|
|
|
"code.gitea.io/gitea/modules/web" |
|
|
|
"code.gitea.io/gitea/modules/web" |
|
|
|
"code.gitea.io/gitea/modules/web/middleware" |
|
|
|
"code.gitea.io/gitea/modules/web/middleware" |
|
|
|
"code.gitea.io/gitea/routers/utils" |
|
|
|
"code.gitea.io/gitea/routers/utils" |
|
|
@ -619,7 +621,9 @@ func handleUserCreated(ctx *context.Context, u *user_model.User, gothUser *goth. |
|
|
|
// update external user information
|
|
|
|
// update external user information
|
|
|
|
if gothUser != nil { |
|
|
|
if gothUser != nil { |
|
|
|
if err := externalaccount.UpdateExternalUser(u, *gothUser); err != nil { |
|
|
|
if err := externalaccount.UpdateExternalUser(u, *gothUser); err != nil { |
|
|
|
log.Error("UpdateExternalUser failed: %v", err) |
|
|
|
if !errors.Is(err, util.ErrNotExist) { |
|
|
|
|
|
|
|
log.Error("UpdateExternalUser failed: %v", err) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|