* @param Authenticatable $user
* @return \Illuminate\Http\RedirectResponse
* @throws AuthException
+ * @throws \BookStack\Exceptions\LdapException
*/
protected function authenticated(Request $request, Authenticatable $user)
{
// 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', '/');