1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix for password reset

This commit is contained in:
Hillel Coren 2018-01-10 15:10:49 +02:00
parent 488aa955ec
commit 303e17f6af
4 changed files with 4 additions and 18 deletions

View File

@ -4,7 +4,6 @@ namespace App\Http\Controllers\Auth;
use Event;
use Illuminate\Http\Request;
use App\Models\PasswordReset;
use App\Events\UserLoggedIn;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
@ -59,14 +58,8 @@ class ResetPasswordController extends Controller
public function showResetForm(Request $request, $token = null)
{
$passwordReset = PasswordReset::whereToken($token)->first();
if (! $passwordReset) {
return redirect('login')->withMessage(trans('texts.invalid_code'));
}
return view('auth.passwords.reset')->with(
['token' => $token, 'email' => $passwordReset->email]
['token' => $token]
);
}
}

View File

@ -4,7 +4,6 @@ namespace App\Http\Controllers\ClientAuth;
use Password;
use Config;
use App\Models\PasswordReset;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
@ -55,14 +54,8 @@ class ResetPasswordController extends Controller
public function showResetForm(Request $request, $token = null)
{
$passwordReset = PasswordReset::whereToken($token)->first();
if (! $passwordReset) {
return redirect('login')->withMessage(trans('texts.invalid_code'));
}
return view('clientauth.passwords.reset')->with(
['token' => $token, 'email' => $passwordReset->email]
['token' => $token]
);
}

View File

@ -40,7 +40,7 @@
<input type="hidden" name="token" value="{{{ $token }}}">
<div>
{!! Former::text('email')->placeholder(trans('texts.email'))->value($email)->readonly(true)->raw() !!}
{!! Former::text('email')->placeholder(trans('texts.email'))->raw() !!}
{!! Former::password('password')->placeholder(trans('texts.password'))->autocomplete('new-password')->raw() !!}
{!! Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->autocomplete('new-password')->raw() !!}
</div>

View File

@ -40,7 +40,7 @@
<input type="hidden" name="token" value="{{{ $token }}}">
<div>
{!! Former::text('email')->placeholder(trans('texts.email'))->value($email)->readonly(true)->raw() !!}
{!! Former::text('email')->placeholder(trans('texts.email'))->raw() !!}
{!! Former::password('password')->placeholder(trans('texts.password'))->autocomplete('new-password')->raw() !!}
{!! Former::password('password_confirmation')->placeholder(trans('texts.confirm_password'))->autocomplete('new-password')->raw() !!}
</div>