|
1 | 1 | <?php |
2 | | -/** |
3 | | - * Pterodactyl - Panel |
4 | | - * Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>. |
5 | | - * |
6 | | - * This software is licensed under the terms of the MIT license. |
7 | | - * https://opensource.org/licenses/MIT |
8 | | - */ |
9 | 2 |
|
10 | 3 | namespace Pterodactyl\Http\Controllers\Auth; |
11 | 4 |
|
12 | 5 | use Illuminate\Http\Request; |
| 6 | +use Illuminate\Http\RedirectResponse; |
13 | 7 | use Illuminate\Support\Facades\Password; |
14 | 8 | use Pterodactyl\Http\Controllers\Controller; |
15 | 9 | use Pterodactyl\Events\Auth\FailedPasswordReset; |
16 | 10 | use Illuminate\Foundation\Auth\SendsPasswordResetEmails; |
17 | 11 |
|
18 | 12 | class ForgotPasswordController extends Controller |
19 | 13 | { |
20 | | - /* |
21 | | - |-------------------------------------------------------------------------- |
22 | | - | Password Reset Controller |
23 | | - |-------------------------------------------------------------------------- |
24 | | - | |
25 | | - | This controller is responsible for handling password reset emails and |
26 | | - | includes a trait which assists in sending these notifications from |
27 | | - | your application to your users. Feel free to explore this trait. |
28 | | - | |
29 | | - */ |
30 | | - |
31 | 14 | use SendsPasswordResetEmails; |
32 | 15 |
|
33 | | - /** |
34 | | - * Create a new controller instance. |
35 | | - */ |
36 | | - public function __construct() |
37 | | - { |
38 | | - $this->middleware('guest'); |
39 | | - } |
40 | | - |
41 | 16 | /** |
42 | 17 | * Get the response for a failed password reset link. |
43 | 18 | * |
44 | 19 | * @param \Illuminate\Http\Request |
45 | 20 | * @param string $response |
46 | 21 | * @return \Illuminate\Http\RedirectResponse |
47 | 22 | */ |
48 | | - protected function sendResetLinkFailedResponse(Request $request, $response) |
| 23 | + protected function sendResetLinkFailedResponse(Request $request, $response): RedirectResponse |
49 | 24 | { |
50 | 25 | // As noted in #358 we will return success even if it failed |
51 | 26 | // to avoid pointing out that an account does or does not |
52 | 27 | // exist on the system. |
53 | | - event(new FailedPasswordReset($request->ip(), $request->only('email'))); |
| 28 | + event(new FailedPasswordReset($request->ip(), $request->input('email'))); |
54 | 29 |
|
55 | 30 | return $this->sendResetLinkResponse(Password::RESET_LINK_SENT); |
56 | 31 | } |
|
0 commit comments