Skip to content

Commit

Permalink
Merge pull request #5428 from Laravel-Backpack/fix-user-creation-on-c…
Browse files Browse the repository at this point in the history
…onsole

use Hash to encrypt password as we use to decrypt
  • Loading branch information
pxpm authored Jan 22, 2024
2 parents d92ce22 + df26145 commit de5668b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/Console/Commands/CreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Backpack\CRUD\app\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;

class CreateUser extends Command
{
Expand Down Expand Up @@ -46,7 +47,7 @@ public function handle()
}

if ($this->option('encrypt')) {
$password = bcrypt($password);
$password = Hash::make($password);
}

$auth = config('backpack.base.user_model_fqn', 'App\User');
Expand Down

0 comments on commit de5668b

Please sign in to comment.