From cd594914b7f546bb32f9b2230db838b3e0640605 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 1 Jun 2021 09:02:30 +1000 Subject: [PATCH 1/2] fixes for password reset screen --- app/Http/Controllers/Auth/ForgotPasswordController.php | 7 +++++-- app/Http/Controllers/Auth/ResetPasswordController.php | 6 +++++- app/Services/Subscription/SubscriptionService.php | 5 +++-- routes/web.php | 4 ++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 822c3c355e25..a9c666e8c26b 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -132,8 +132,11 @@ class ForgotPasswordController extends Controller : $this->sendResetLinkFailedResponse($request, $response); } - public function showLinkRequestForm() + public function showLinkRequestForm(Request $request) { - return $this->render('auth.passwords.request', ['root' => 'themes']); + $account_id = $request->get('account_id'); + $account = Account::find($account_id); + + return $this->render('auth.passwords.request', ['root' => 'themes', 'account' => $account]); } } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 9625a3dfc747..3650c186644a 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Models\Account; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; @@ -52,7 +53,10 @@ class ResetPasswordController extends Controller public function showResetForm(Request $request, $token = null) { - return $this->render('auth.passwords.reset', ['root' => 'themes', 'token' => $token]); + $account_id = $request->get('account_id'); + $account = Account::find($account_id); + + return $this->render('auth.passwords.reset', ['root' => 'themes', 'token' => $token, 'account' => $account]); } /** diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 17169b85b157..dd5d8346f1c3 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -486,7 +486,8 @@ class SubscriptionService /** * Handle a plan change where no payment is required * - * @param array $data + * @param array $data + * @deprecated - no usage found */ public function handlePlanChangeNoPayment($data) { @@ -655,7 +656,7 @@ class SubscriptionService $status = $response->getStatusCode(); //$response_body = $response->getReasonPhrase(); - $body = array_merge($body, ['status' => $status, 'response_body' => $response_body]); + //$body = array_merge($body, ['status' => $status, 'response_body' => $response_body]); } diff --git a/routes/web.php b/routes/web.php index af15b87590b9..5a7b556ecd9a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,9 +15,9 @@ Route::post('setup/check_db', 'SetupController@checkDB')->middleware('guest'); Route::post('setup/check_mail', 'SetupController@checkMail')->middleware('guest'); Route::post('setup/check_pdf', 'SetupController@checkPdf')->middleware('guest'); -Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); +Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->middleware('domain_db')->name('password.request'); Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); -Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->middleware('email_db')->name('password.reset'); +Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->middleware(['domain_db','email_db'])->name('password.reset'); Route::post('password/reset', 'Auth\ResetPasswordController@reset')->middleware('email_db')->name('password.update'); /* From 45cc051f40a6d2cef00971cb80cacc87b746deaa Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 1 Jun 2021 09:03:38 +1000 Subject: [PATCH 2/2] v5.1.70 --- VERSION.txt | 2 +- config/ninja.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 4a79f4075995..6c0a3ed796de 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.1.69 \ No newline at end of file +5.1.70 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index 777c913d67f2..8d1e540f642d 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,8 +14,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => '5.1.69', - 'app_tag' => '5.1.69-release', + 'app_version' => '5.1.70', + 'app_tag' => '5.1.70-release', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),