mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 14:06:15 +01:00
Backport #22750 Fixes https://github.com/go-gitea/gitea/issues/22523 Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
3647e62ef9
commit
638fbd0b78
1 changed files with 4 additions and 0 deletions
|
@ -574,12 +574,16 @@ func runCreateUser(c *cli.Context) error {
|
|||
restricted = util.OptionalBoolOf(c.Bool("restricted"))
|
||||
}
|
||||
|
||||
// default user visibility in app.ini
|
||||
visibility := setting.Service.DefaultUserVisibilityMode
|
||||
|
||||
u := &user_model.User{
|
||||
Name: username,
|
||||
Email: c.String("email"),
|
||||
Passwd: password,
|
||||
IsAdmin: c.Bool("admin"),
|
||||
MustChangePassword: changePassword,
|
||||
Visibility: visibility,
|
||||
}
|
||||
|
||||
overwriteDefault := &user_model.CreateUserOverwriteOptions{
|
||||
|
|
Loading…
Reference in a new issue