X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b5a2d3c1c423d81b80fd7034a33ada85863a29ad..refs/pull/1096/head:/app/Http/Controllers/Auth/LoginController.php diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index e011c642f..e820154e7 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\Auth\Access\LdapService; +use BookStack\Auth\Access\SocialAuthService; +use BookStack\Auth\UserRepo; use BookStack\Exceptions\AuthException; use BookStack\Http\Controllers\Controller; -use BookStack\Repos\UserRepo; -use BookStack\Services\LdapService; -use BookStack\Services\SocialAuthService; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; @@ -43,9 +43,9 @@ class LoginController extends Controller /** * Create a new controller instance. * - * @param SocialAuthService $socialAuthService + * @param \BookStack\Auth\\BookStack\Auth\Access\SocialAuthService $socialAuthService * @param LdapService $ldapService - * @param UserRepo $userRepo + * @param \BookStack\Auth\UserRepo $userRepo */ public function __construct(SocialAuthService $socialAuthService, LdapService $ldapService, UserRepo $userRepo) { @@ -70,6 +70,7 @@ class LoginController extends Controller * @param Authenticatable $user * @return \Illuminate\Http\RedirectResponse * @throws AuthException + * @throws \BookStack\Exceptions\LdapException */ protected function authenticated(Request $request, Authenticatable $user) { @@ -102,7 +103,7 @@ class LoginController extends Controller // Sync LDAP groups if required if ($this->ldapService->shouldSyncGroups()) { - $this->ldapService->syncGroups($user); + $this->ldapService->syncGroups($user, $request->get($this->username())); } $path = session()->pull('url.intended', '/');