]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/LoginController.php
Add git to the apt-get install packages.
[bookstack] / app / Http / Controllers / Auth / LoginController.php
index 78a8d33c0aed8ae342a5a80d86b4c2015ef02158..c739fd9a337387a973ba12d119059f84cf27cd07 100644 (file)
@@ -53,8 +53,8 @@ class LoginController extends Controller
         $this->socialAuthService = $socialAuthService;
         $this->ldapService = $ldapService;
         $this->userRepo = $userRepo;
-        $this->redirectPath = baseUrl('/');
-        $this->redirectAfterLogout = baseUrl('/login');
+        $this->redirectPath = url('/');
+        $this->redirectAfterLogout = url('/login');
         parent::__construct();
     }
 
@@ -106,9 +106,7 @@ class LoginController extends Controller
             $this->ldapService->syncGroups($user, $request->get($this->username()));
         }
 
-        $path = session()->pull('url.intended', '/');
-        $path = baseUrl($path, true);
-        return redirect($path);
+        return redirect()->intended('/');
     }
 
     /**