Skip to content

Commit 2ca767a

Browse files
committed
update disabled plugs
1 parent 7df5020 commit 2ca767a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/app/Http/Controllers/TwoStepController.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ private function invalidCodeReturnData($errors = null)
8686
*/
8787
public function showVerification()
8888
{
89+
if (!config('laravel2step.laravel2stepEnabled')) {
90+
abort(404);
91+
}
92+
8993
$twoStepAuth = $this->_twoStepAuth;
9094
$authStatus = $this->_authStatus;
9195

@@ -140,6 +144,10 @@ public function showVerification()
140144
*/
141145
public function verify(Request $request)
142146
{
147+
if (!config('laravel2step.laravel2stepEnabled')) {
148+
abort(404);
149+
}
150+
143151
if($request->ajax()) {
144152

145153
$validator = Validator::make($request->all(), [
@@ -187,11 +195,13 @@ public function verify(Request $request)
187195
*/
188196
public function resend()
189197
{
198+
if (!config('laravel2step.laravel2stepEnabled')) {
199+
abort(404);
200+
}
201+
190202
$twoStepAuth = $this->_twoStepAuth;
191203
$this->sendVerificationCodeNotification($twoStepAuth);
192204

193-
194-
195205
$returnData = [
196206
'title' => trans('laravel2step::laravel-verification.verificationEmailSuccess'),
197207
'message' => trans('laravel2step::laravel-verification.verificationEmailSentMsg'),

0 commit comments

Comments
 (0)