Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/Actions/CreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use App\Models\User;
use Illuminate\Auth\Events\Registered;
use Illuminate\Support\Facades\Hash;
use SensitiveParameter;

final readonly class CreateUser
Expand All @@ -18,7 +17,7 @@ public function handle(array $attributes, #[SensitiveParameter] string $password
{
$user = User::query()->create([
...$attributes,
'password' => Hash::make($password),
'password' => $password,
]);

event(new Registered($user));
Expand Down
3 changes: 1 addition & 2 deletions app/Actions/CreateUserPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use App\Models\User;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
use SensitiveParameter;
Expand All @@ -22,7 +21,7 @@ public function handle(array $credentials, #[SensitiveParameter] string $passwor
$credentials,
function (User $user) use ($password): void {
$user->update([
'password' => Hash::make($password),
'password' => $password,
'remember_token' => Str::random(60),
]);

Expand Down
3 changes: 1 addition & 2 deletions app/Actions/UpdateUserPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
namespace App\Actions;

use App\Models\User;
use Illuminate\Support\Facades\Hash;
use SensitiveParameter;

final readonly class UpdateUserPassword
{
public function handle(User $user, #[SensitiveParameter] string $password): void
{
$user->update([
'password' => Hash::make($password),
'password' => $password,
]);
}
}