Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/user_ldap/lib/Group_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,22 +877,22 @@ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
])
]);
$ldap_users = $this->access->fetchListOfUsers($filter, $attrs, 1);
if (count($ldap_users) < 1) {
continue;
if (empty($ldap_users)) {
break;
}
$groupUsers[] = $this->access->dn2username($ldap_users[0]['dn'][0]);
break;
default:
//we got DNs, check if we need to filter by search or we can give back all of them
$uid = $this->access->dn2username($member);
if (!$uid) {
continue;
break;
}

$cacheKey = 'userExistsOnLDAP' . $uid;
$userExists = $this->access->connection->getFromCache($cacheKey);
if ($userExists === false) {
continue;
break;
}
if ($userExists === null || $search !== '') {
if (!$this->access->readAttribute($member,
Expand All @@ -904,7 +904,7 @@ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if ($search === '') {
$this->access->connection->writeToCache($cacheKey, false);
}
continue;
break;
}
$this->access->connection->writeToCache($cacheKey, true);
}
Expand Down