Skip to content

Commit

Permalink
Merge pull request #490 from root-gg/fix_489
Browse files Browse the repository at this point in the history
Fix create user password parameter (#489)
  • Loading branch information
camathieu authored Aug 2, 2023
2 parents 68ad0d9 + 23a80f6 commit c125b55
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/cmd/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ func createUser(cmd *cobra.Command, args []string) {
params.MaxTTL = maxTTL
}

if userParams.provider == common.ProviderLocal && userParams.password == "" {
userParams.password = common.GenerateRandomID(32)
fmt.Printf("Generated password for user %s is %s\n", userParams.login, userParams.password)
if userParams.provider == common.ProviderLocal {
if userParams.password == "" {
userParams.password = common.GenerateRandomID(32)
fmt.Printf("Generated password for user %s is %s\n", userParams.login, userParams.password)
}
params.Password = userParams.password
}

Expand Down

0 comments on commit c125b55

Please sign in to comment.