X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/919660678bec2b94eaa84ac60d0313f5ef07dfb7..refs/pull/1695/head:/app/Http/Controllers/Auth/LoginController.php diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 8ef46c298..c739fd9a3 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -2,11 +2,11 @@ namespace BookStack\Http\Controllers\Auth; -use BookStack\Exceptions\AuthException; -use BookStack\Http\Controllers\Controller; -use BookStack\Auth\UserRepo; use BookStack\Auth\Access\LdapService; use BookStack\Auth\Access\SocialAuthService; +use BookStack\Auth\UserRepo; +use BookStack\Exceptions\AuthException; +use BookStack\Http\Controllers\Controller; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; @@ -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('/https/source.bookstackapp.com/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('/'); } /** @@ -128,7 +126,7 @@ class LoginController extends Controller ]); } - return view('auth/login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]); + return view('auth.login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]); } /**