Skip to content

Commit

Permalink
Add check if identifier for all groups/user is set to make looser fil…
Browse files Browse the repository at this point in the history
…ter possible
  • Loading branch information
DavidPatzke committed Jun 28, 2019
1 parent 0fd8ab5 commit 384b4ba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Security/Provider/LDAPIdentitiesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public function getAllUsers()
if ($ldapUserList !== null) {

foreach (array_slice($ldapUserList, 2) as $ldapUser) {
$user[] = new User($ldapUser[$nameAttribute][0]);
if(isset($ldapUser[$nameAttribute][0])){
$user[] = new User($ldapUser[$nameAttribute][0]);
}

}

}
Expand Down Expand Up @@ -66,7 +69,11 @@ public function getAllGroups()
$ldapGroupList = $ldapClient->find($groupDn, $groupFilter);
if ($ldapGroupList != null) {
foreach (array_slice($ldapGroupList, 2) as $ldapGroup) {
$groups[] = new Group($ldapGroup[$groupIdentifier][0]);
if(isset($ldapGroup[$groupIdentifier])){
$groups[] = new Group($ldapGroup[$groupIdentifier][0]);
}


}

}
Expand Down

0 comments on commit 384b4ba

Please sign in to comment.