| @@ 408-416 (lines=9) @@ | ||
| 405 | * @param int $offset |
|
| 406 | * @return int |
|
| 407 | */ |
|
| 408 | public function countUsersInGidNumber($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 409 | try { |
|
| 410 | $filter = $this->prepareFilterForUsersHasGidNumber($groupDN, $search); |
|
| 411 | $users = $this->access->countUsers($filter, ['dn'], $limit, $offset); |
|
| 412 | return (int)$users; |
|
| 413 | } catch (\Exception $e) { |
|
| 414 | return 0; |
|
| 415 | } |
|
| 416 | } |
|
| 417 | ||
| 418 | /** |
|
| 419 | * gets the gidNumber of a user |
|
| @@ 572-580 (lines=9) @@ | ||
| 569 | * @param int $offset |
|
| 570 | * @return int |
|
| 571 | */ |
|
| 572 | public function countUsersInPrimaryGroup($groupDN, $search = '', $limit = -1, $offset = 0) { |
|
| 573 | try { |
|
| 574 | $filter = $this->prepareFilterForUsersInPrimaryGroup($groupDN, $search); |
|
| 575 | $users = $this->access->countUsers($filter, array('dn'), $limit, $offset); |
|
| 576 | return (int)$users; |
|
| 577 | } catch (\Exception $e) { |
|
| 578 | return 0; |
|
| 579 | } |
|
| 580 | } |
|
| 581 | ||
| 582 | /** |
|
| 583 | * gets the primary group of a user |
|