Skip to content

Commit

Permalink
replace deprecated str_random function by Str::random (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlalande committed Sep 10, 2020
1 parent 3406f61 commit 871c60b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Commands/CreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use BOAIdeas\CreateUser\Notifications\UserAccountCreated as UserAccountCreatedNotification;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Validator;

class CreateUser extends Command
Expand Down Expand Up @@ -33,7 +34,7 @@ public function handle()
$email = $this->validate_ask('Enter user email', ['email' => config('createuser.validation_rules.email')]);

if ($this->confirm('Do you wish to create a random password?')) {
$password = str_random(8);
$password = Str::random(8);
$this->info('*The randomly created password is: '.$password);
} else {
$password = $this->validate_ask('Enter user password', ['password' => config('createuser.validation_rules.password')], true);
Expand Down

0 comments on commit 871c60b

Please sign in to comment.