diff --git a/routers/install/install.go b/routers/install/install.go index b680f7dd75..9d28bc1571 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -505,7 +505,8 @@ func SubmitInstall(ctx *context.Context) { IsAdmin: true, } overwriteDefault := &user_model.CreateUserOverwriteOptions{ - IsActive: new(bool), + IsRestricted: util.OptionalBoolFalse, + IsActive: util.OptionalBoolTrue, } if err = user_model.CreateUser(u, overwriteDefault); err != nil { diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go index 7c5a3f7474..1e894262d6 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -512,7 +512,7 @@ func SignUpPost(ctx *context.Context) { Passwd: form.Password, } - if !createAndHandleCreatedUser(ctx, tplSignUp, form, u, nil, false) { + if !createAndHandleCreatedUser(ctx, tplSignUp, form, u, nil, nil, false) { // error already handled return } diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go index f5e06d1f9d..c3e96f077a 100644 --- a/routers/web/auth/linkaccount.go +++ b/routers/web/auth/linkaccount.go @@ -288,7 +288,7 @@ func LinkAccountPostRegister(ctx *context.Context) { LoginName: gothUser.UserID, } - if !createAndHandleCreatedUser(ctx, tplLinkAccount, form, u, &gothUser, false) { + if !createAndHandleCreatedUser(ctx, tplLinkAccount, form, u, nil, &gothUser, false) { // error already handled return }