Skip to content

Commit

Permalink
fix: fix password saving at registration (monicahq/chandler#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Nov 8, 2022
1 parent fbb210b commit 88e5502
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Actions/Fortify/CreateNewUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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'),
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]);
Expand Down

0 comments on commit 88e5502

Please sign in to comment.