| @@ 384-397 (lines=14) @@ | ||
| 381 | * @param int $offset |
|
| 382 | * @return string[] |
|
| 383 | */ |
|
| 384 | public function getUsersInGidNumber($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 385 | try { |
|
| 386 | $filter = $this->prepareFilterForUsersHasGidNumber($groupDN, $search); |
|
| 387 | $users = $this->access->fetchListOfUsers( |
|
| 388 | $filter, |
|
| 389 | [$this->access->connection->ldapUserDisplayName, 'dn'], |
|
| 390 | $limit, |
|
| 391 | $offset |
|
| 392 | ); |
|
| 393 | return $this->access->nextcloudUserNames($users); |
|
| 394 | } catch (\Exception $e) { |
|
| 395 | return []; |
|
| 396 | } |
|
| 397 | } |
|
| 398 | ||
| 399 | /** |
|
| 400 | * returns the number of users that have the given group as gid number |
|
| @@ 548-561 (lines=14) @@ | ||
| 545 | * @param int $offset |
|
| 546 | * @return string[] |
|
| 547 | */ |
|
| 548 | public function getUsersInPrimaryGroup($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 549 | try { |
|
| 550 | $filter = $this->prepareFilterForUsersInPrimaryGroup($groupDN, $search); |
|
| 551 | $users = $this->access->fetchListOfUsers( |
|
| 552 | $filter, |
|
| 553 | array($this->access->connection->ldapUserDisplayName, 'dn'), |
|
| 554 | $limit, |
|
| 555 | $offset |
|
| 556 | ); |
|
| 557 | return $this->access->nextcloudUserNames($users); |
|
| 558 | } catch (\Exception $e) { |
|
| 559 | return array(); |
|
| 560 | } |
|
| 561 | } |
|
| 562 | ||
| 563 | /** |
|
| 564 | * returns the number of users that have the given group as primary group |
|