]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/LoginController.php
Update entities.php
[bookstack] / app / Http / Controllers / Auth / LoginController.php
index 791c265ad3b0a838491bb02f44f0d205e156bbe7..78a8d33c0aed8ae342a5a80d86b4c2015ef02158 100644 (file)
@@ -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)
     {
@@ -103,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', '/');
@@ -128,7 +128,7 @@ class LoginController extends Controller
             ]);
         }
 
-        return view('auth/login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]);
+        return view('auth.login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]);
     }
 
     /**