mirror of https://github.com/go-gitea/gitea.git
Backport of #21504 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
169c08e20a
commit
2ccf940464
|
@ -613,9 +613,11 @@ 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 {
|
||||||
|
if !user_model.IsErrExternalLoginUserNotExist(err) {
|
||||||
log.Error("UpdateExternalUser failed: %v", err)
|
log.Error("UpdateExternalUser failed: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Send confirmation email
|
// Send confirmation email
|
||||||
if !u.IsActive && u.ID > 1 {
|
if !u.IsActive && u.ID > 1 {
|
||||||
|
|
|
@ -1061,8 +1061,10 @@ func handleOAuth2SignIn(ctx *context.Context, source *auth.Source, u *user_model
|
||||||
|
|
||||||
// update external user information
|
// update external user information
|
||||||
if err := externalaccount.UpdateExternalUser(u, gothUser); err != nil {
|
if err := externalaccount.UpdateExternalUser(u, gothUser); err != nil {
|
||||||
|
if !user_model.IsErrExternalLoginUserNotExist(err) {
|
||||||
log.Error("UpdateExternalUser failed: %v", err)
|
log.Error("UpdateExternalUser failed: %v", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err := resetLocale(ctx, u); err != nil {
|
if err := resetLocale(ctx, u); err != nil {
|
||||||
ctx.ServerError("resetLocale", err)
|
ctx.ServerError("resetLocale", err)
|
||||||
|
|
Loading…
Reference in New Issue