initial commit
This commit is contained in:
		
							
								
								
									
										30
									
								
								app/Actions/Fortify/ResetUserPassword.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								app/Actions/Fortify/ResetUserPassword.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| <?php | ||||
| 
 | ||||
| namespace App\Actions\Fortify; | ||||
| 
 | ||||
| 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  mixed  $user | ||||
|      * @param  array  $input | ||||
|      * @return void | ||||
|      */ | ||||
|     public function reset($user, array $input) | ||||
|     { | ||||
|         Validator::make($input, [ | ||||
|             'password' => $this->passwordRules(), | ||||
|         ])->validate(); | ||||
| 
 | ||||
|         $user->forceFill([ | ||||
|             'password' => Hash::make($input['password']), | ||||
|         ])->save(); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user