|
@@ 245-252 (lines=8) @@
|
| 242 |
|
$groups = array(); |
| 243 |
|
foreach ($this->backends as $backend) { |
| 244 |
|
$groupIds = $backend->getGroups($search, $limit, $offset); |
| 245 |
|
foreach ($groupIds as $groupId) { |
| 246 |
|
$aGroup = $this->get($groupId); |
| 247 |
|
if ($aGroup instanceof IGroup) { |
| 248 |
|
$groups[$groupId] = $aGroup; |
| 249 |
|
} else { |
| 250 |
|
$this->logger->debug('Group "' . $groupId . '" was returned by search but not found through direct access', ['app' => 'core']); |
| 251 |
|
} |
| 252 |
|
} |
| 253 |
|
if (!is_null($limit) and $limit <= 0) { |
| 254 |
|
return array_values($groups); |
| 255 |
|
} |
|
@@ 283-290 (lines=8) @@
|
| 280 |
|
foreach ($this->backends as $backend) { |
| 281 |
|
$groupIds = $backend->getUserGroups($uid); |
| 282 |
|
if (is_array($groupIds)) { |
| 283 |
|
foreach ($groupIds as $groupId) { |
| 284 |
|
$aGroup = $this->get($groupId); |
| 285 |
|
if ($aGroup instanceof IGroup) { |
| 286 |
|
$groups[$groupId] = $aGroup; |
| 287 |
|
} else { |
| 288 |
|
$this->logger->debug('User "' . $uid . '" belongs to deleted group: "' . $groupId . '"', ['app' => 'core']); |
| 289 |
|
} |
| 290 |
|
} |
| 291 |
|
} |
| 292 |
|
} |
| 293 |
|
$this->cachedUserGroups[$uid] = $groups; |