Explorar el Código

fixed auth middleware

Josh hace 4 años
padre
commit
3ad5a427d1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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');
         }