]> BookStack Code Mirror - bookstack/commitdiff
Fixed incorrect type error in LDAP group sync
authorDan Brown <redacted>
Sun, 12 Aug 2018 12:28:40 +0000 (13:28 +0100)
committerDan Brown <redacted>
Sun, 12 Aug 2018 12:28:40 +0000 (13:28 +0100)
Should fix #951

app/Http/Controllers/Auth/LoginController.php
app/Services/LdapService.php

index e011c642fcc3b0b047b643ea262b3e34c1b667b5..791c265ad3b0a838491bb02f44f0d205e156bbe7 100644 (file)
@@ -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)
     {
index 4936b2da87842ccd8c9f8881dd973be7428ba2ea..c11094aa9f6bdc08855cdaf2bed91134f9657b9f 100644 (file)
@@ -202,7 +202,7 @@ class LdapService
     /**
      * Get the groups a user is a part of on ldap
      * @param string $userName
-     * @return array|null
+     * @return array
      * @throws LdapException
      */
     public function getUserGroups($userName)
@@ -211,7 +211,7 @@ class LdapService
         $user = $this->getUserWithAttributes($userName, [$groupsAttr]);
 
         if ($user === null) {
-            return null;
+            return [];
         }
 
         $userGroups = $this->groupFilter($user);
Morty Proxy This is a proxified and sanitized view of the page, visit original site.