| @@ 403-411 (lines=9) @@ | ||
| 400 | * @param int $offset |
|
| 401 | * @return int |
|
| 402 | */ |
|
| 403 | public function countUsersInGidNumber($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 404 | try { |
|
| 405 | $filter = $this->prepareFilterForUsersHasGidNumber($groupDN, $search); |
|
| 406 | $users = $this->access->countUsers($filter, ['dn'], $limit, $offset); |
|
| 407 | return (int)$users; |
|
| 408 | } catch (\Exception $e) { |
|
| 409 | return 0; |
|
| 410 | } |
|
| 411 | } |
|
| 412 | ||
| 413 | /** |
|
| 414 | * gets the gidNumber of a user |
|
| @@ 567-575 (lines=9) @@ | ||
| 564 | * @param int $offset |
|
| 565 | * @return int |
|
| 566 | */ |
|
| 567 | public function countUsersInPrimaryGroup($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 568 | try { |
|
| 569 | $filter = $this->prepareFilterForUsersInPrimaryGroup($groupDN, $search); |
|
| 570 | $users = $this->access->countUsers($filter, array('dn'), $limit, $offset); |
|
| 571 | return (int)$users; |
|
| 572 | } catch (\Exception $e) { |
|
| 573 | return 0; |
|
| 574 | } |
|
| 575 | } |
|
| 576 | ||
| 577 | /** |
|
| 578 | * gets the primary group of a user |
|