|
|
@ -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,9 +621,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 !errors.Is(err, util.ErrNotExist) { |
|
|
|
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 { |
|
|
|