Spaces:
Sleeping
Sleeping
Download app/Actions/Fortify/ResetUserPassword.php from wepee/CAPS04-FE-REFACTOR: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/spaces/wepee/CAPS04-FE-REFACTOR/resolve/refs%2Fpr%2F1/app/Actions/Fortify/ResetUserPassword.php
- Command line
-
hf download hf://spaces/wepee/CAPS04-FE-REFACTOR@refs/pr/1/app/Actions/Fortify/ResetUserPassword.php
-
curl -L -o ResetUserPassword.php https://huggingface.co/spaces/wepee/CAPS04-FE-REFACTOR/resolve/refs%2Fpr%2F1/app/Actions/Fortify/ResetUserPassword.php
686 Bytes
| namespace App\Actions\Fortify; | |
| use App\Concerns\PasswordValidationRules; | |
| use App\Models\User; | |
| use Illuminate\Support\Facades\Validator; | |
| use Laravel\Fortify\Contracts\ResetsUserPasswords; | |
| class ResetUserPassword implements ResetsUserPasswords | |
| { | |
| use PasswordValidationRules; | |
| /** | |
| * Validate and reset the user's forgotten password. | |
| * | |
| * @param array<string, string> $input | |
| */ | |
| public function reset(User $user, array $input): void | |
| { | |
| Validator::make($input, [ | |
| 'password' => $this->passwordRules(), | |
| ])->validate(); | |
| $user->forceFill([ | |
| 'password' => $input['password'], | |
| ])->save(); | |
| } | |
| } | |