aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/auth.go')
-rw-r--r--routers/web/user/auth.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go
index 02f5afd8ba..a71a278958 100644
--- a/routers/web/user/auth.go
+++ b/routers/web/user/auth.go
@@ -681,13 +681,14 @@ func SignInOAuthCallback(ctx *context.Context) {
return
}
u = &user_model.User{
- Name: getUserName(&gothUser),
- FullName: gothUser.Name,
- Email: gothUser.Email,
- IsActive: !setting.OAuth2Client.RegisterEmailConfirm,
- LoginType: login.OAuth2,
- LoginSource: loginSource.ID,
- LoginName: gothUser.UserID,
+ Name: getUserName(&gothUser),
+ FullName: gothUser.Name,
+ Email: gothUser.Email,
+ IsActive: !setting.OAuth2Client.RegisterEmailConfirm,
+ LoginType: login.OAuth2,
+ LoginSource: loginSource.ID,
+ LoginName: gothUser.UserID,
+ IsRestricted: setting.Service.DefaultUserIsRestricted,
}
if !createAndHandleCreatedUser(ctx, base.TplName(""), nil, u, &gothUser, setting.OAuth2Client.AccountLinking != setting.OAuth2AccountLinkingDisabled) {