Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - > WITH SOLUTION: Error Password Hash when Change de Password in Edit Profile Page #45

Open
techspot opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@techspot
Copy link

techspot commented May 7, 2024

When the logged in user tries to edit the password, it is not being encrypted when sent to the database.

Solution:
change the file: app/Filament/Resources/UserResource.php

Line: 45

Change this:
->required()

To this:

->dehydrateStateUsing(fn ($state) => Hash::make($state))
->dehydrated(fn ($state) => filled($state))
->required(fn (string $context): bool => $context === 'create')

I try this and Works for me.

Reference: https://v2.filamentphp.com/tricks/password-form-fields

@ruswan ruswan added the bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants