diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 5311330d94a..4b1f50689d0 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -3,7 +3,7 @@ namespace App\Actions\Fortify; use App\Domains\Settings\CreateAccount\Services\CreateAccount; -use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Laravel\Fortify\Contracts\CreatesNewUsers; use Laravel\Jetstream\Jetstream; @@ -32,7 +32,7 @@ public function create(array $input) 'first_name' => $input['first_name'], 'last_name' => $input['last_name'], 'email' => $input['email'], - 'password' => isset($input['password']) ? Hash::make($input['password']) : null, + 'password' => Arr::get($input, 'password'), ]); } } diff --git a/app/Domains/Settings/CreateAccount/Services/CreateAccount.php b/app/Domains/Settings/CreateAccount/Services/CreateAccount.php index dc709df87c7..e113a67ca11 100644 --- a/app/Domains/Settings/CreateAccount/Services/CreateAccount.php +++ b/app/Domains/Settings/CreateAccount/Services/CreateAccount.php @@ -60,7 +60,7 @@ private function addFirstUser(): User 'first_name' => $this->data['first_name'], 'last_name' => $this->data['last_name'], 'email' => $this->data['email'], - 'password' => Hash::make($this->data['password']), + 'password' => isset($this->data['password']) ? Hash::make($this->data['password']) : null, 'is_account_administrator' => true, 'timezone' => 'UTC', ]);