Skip to content

Commit ddced41

Browse files
committed
simplify by removing unnneccessary if/else
1 parent c104e50 commit ddced41

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmd/admin.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,11 @@ func runCreateUser(c *cli.Context) error {
289289
return err
290290
}
291291

292-
var changePassword bool
292+
// always default to true
293+
var changePassword = true
293294

294295
if c.IsSet("must-change-password") {
295296
changePassword = c.Bool("must-change-password")
296-
} else {
297-
// always default to true
298-
changePassword = true
299297
}
300298

301299
if err := models.CreateUser(&models.User{

0 commit comments

Comments
 (0)