PHP Classes

File: app/Actions/Fortify/ResetUserPassword.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon DB Admin   app/Actions/Fortify/ResetUserPassword.php   Download  
File: app/Actions/Fortify/ResetUserPassword.php
Role: Class source
Content typex: text/plain
Description: Class source
Class: Jaxon DB Admin
Web application to manage SQL of databases
Author: By
Last change: Update of app/Actions/Fortify/ResetUserPassword.php
Date: 1 month ago
Size: 693 bytes
 

Contents

Class file image Download
<?php

namespace App\Actions\Fortify;

use
App\Models\User;
use
Illuminate\Support\Facades\Hash;
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' => Hash::make($input['password']),
        ])->
save();
    }
}