From: Dan Brown Date: Sun, 12 Aug 2018 12:28:40 +0000 (+0100) Subject: Fixed incorrect type error in LDAP group sync X-Git-Tag: v0.23.1~1^2~3 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/92c983715718a6a4a06b7e953cbdf87f0094af0f Fixed incorrect type error in LDAP group sync Should fix #951 --- diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index e011c642f..791c265ad 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -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) { diff --git a/app/Services/LdapService.php b/app/Services/LdapService.php index 4936b2da8..c11094aa9 100644 --- a/app/Services/LdapService.php +++ b/app/Services/LdapService.php @@ -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);