Skip to content

Commit

Permalink
replace string helper, fix fallback behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldyrynda committed Mar 6, 2020
1 parent b329d52 commit 432da1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Console/Commands/MakeUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;

class MakeUser extends Command
{
Expand Down Expand Up @@ -41,7 +42,7 @@ public function handle()
{
$email = $this->ask("What is the new user's email address?");
$name = $this->ask("What is the new user's name?") ?: '';
$password = $this->secret("What is the new user's password? (blank generates a random one)", str_random(32));
$password = $this->secret("What is the new user's password? (blank generates a random one)") ?: Str::random(32);
$encrypt = $this->confirm('Should the password be encrypted?', true);
$sendReset = $this->confirm('Do you want to send a password reset email?');

Expand Down

0 comments on commit 432da1d

Please sign in to comment.