소스 검색

fixed auth middleware

Josh 4 년 전
부모
커밋
3ad5a427d1
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Http/Middleware/RedirectAuthenticatedPro.php

+ 2 - 2
app/Http/Middleware/RedirectAuthenticatedPro.php

@@ -17,9 +17,9 @@ class RedirectAuthenticatedPro
     public function handle($request, Closure $next)
     {
         $sessionKey = $request->cookie('sessionKey');
-        $appSession = AppSession::where('session_key', $sessionKey)->first();
+        $appSession = AppSession::where('session_key', $sessionKey)->where('is_active', true)->first();
 
-        if($appSession && $appSession->is_active && $appSession->pro) {
+        if($appSession && $appSession->pro) {
             return redirect()->route('dashboard');
         }