From 2ca767a36ba59687523f5c04491af67753040d06 Mon Sep 17 00:00:00 2001 From: jeremykenedy Date: Sun, 21 Jan 2018 16:59:09 -0800 Subject: [PATCH] update disabled plugs --- src/app/Http/Controllers/TwoStepController.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/Http/Controllers/TwoStepController.php b/src/app/Http/Controllers/TwoStepController.php index 3751402..5412a28 100755 --- a/src/app/Http/Controllers/TwoStepController.php +++ b/src/app/Http/Controllers/TwoStepController.php @@ -86,6 +86,10 @@ private function invalidCodeReturnData($errors = null) */ public function showVerification() { + if (!config('laravel2step.laravel2stepEnabled')) { + abort(404); + } + $twoStepAuth = $this->_twoStepAuth; $authStatus = $this->_authStatus; @@ -140,6 +144,10 @@ public function showVerification() */ public function verify(Request $request) { + if (!config('laravel2step.laravel2stepEnabled')) { + abort(404); + } + if($request->ajax()) { $validator = Validator::make($request->all(), [ @@ -187,11 +195,13 @@ public function verify(Request $request) */ public function resend() { + if (!config('laravel2step.laravel2stepEnabled')) { + abort(404); + } + $twoStepAuth = $this->_twoStepAuth; $this->sendVerificationCodeNotification($twoStepAuth); - - $returnData = [ 'title' => trans('laravel2step::laravel-verification.verificationEmailSuccess'), 'message' => trans('laravel2step::laravel-verification.verificationEmailSentMsg'),