Skip to content

Commit

Permalink
Merge pull request #141 from laravel-enso/hotfix/passwordValidator
Browse files Browse the repository at this point in the history
fixes ValidatePasswordRequest & ForgotPasswordController
  • Loading branch information
aocneanu committed Jun 25, 2020
2 parents 1d1a91e + b9e6dec commit 33990d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/App/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;

class ForgotPasswordController extends Controller
{
Expand All @@ -16,9 +15,4 @@ protected function sendResetLinkResponse(Request $request, $response)
{
return ['status' => trans($response)];
}

protected function sendResetLinkFailedResponse(Request $request, $response)
{
throw new UnprocessableEntityHttpException(trans($response));
}
}
2 changes: 1 addition & 1 deletion src/App/Http/Requests/ValidatePasswordRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function rules()

public function withValidator($validator)
{
if ($this->filled('password')) {
if ($this->filled('email', 'password')) {
$this->validatePassword($validator);
}
}
Expand Down

0 comments on commit 33990d6

Please sign in to comment.