Skip to content

Commit

Permalink
simplify by removing unnneccessary if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo committed Oct 6, 2018
1 parent c104e50 commit ddced41
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,11 @@ func runCreateUser(c *cli.Context) error {
return err
}

var changePassword bool
// always default to true
var changePassword = true

if c.IsSet("must-change-password") {
changePassword = c.Bool("must-change-password")
} else {
// always default to true
changePassword = true
}

if err := models.CreateUser(&models.User{
Expand Down

0 comments on commit ddced41

Please sign in to comment.