From c86a699f69dda46bca4105907cb096acbcbb7734 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Thu, 13 Jun 2019 06:34:46 +0530 Subject: [PATCH] Added status check in customer auth session creation function --- .../Customer/src/Http/Controllers/SessionController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php index b7c86a41b..b53d046e7 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php @@ -57,6 +57,12 @@ class SessionController extends Controller return redirect()->back(); } + if (auth()->guard('customer')->user()->status == 0) { + auth()->guard('customer')->logout(); + + return redirect()->back(); + } + if (auth()->guard('customer')->user()->is_verified == 0) { session()->flash('info', trans('shop::app.customer.login-form.verify-first'));