Skip to content

Commit f3a7d55

Browse files
authored
Show autogenerated password
1 parent 01672e9 commit f3a7d55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Commands/CliUserCreateCommand.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public function handle()
9999

100100
$password = str_random(40);
101101

102+
if ($this->option('show-password')) {
103+
$this->info('Generated password: ' . $password . PHP_EOL);
104+
}
105+
102106
} else {
103107
if ($this->confirm('Do you want to set password?')) {
104108

@@ -261,4 +265,4 @@ private function saveUser($model, $fullname, $email, $password)
261265
throw new Exception("Error on saving user!");
262266
}
263267
}
264-
}
268+
}

0 commit comments

Comments
 (0)