|
@@ 673-678 (lines=6) @@
|
| 670 |
|
* @param array $attributes optional, list of attributes to read |
| 671 |
|
* @return array |
| 672 |
|
*/ |
| 673 |
|
public function fetchUsersByLoginName($loginName, $attributes = array('dn')) { |
| 674 |
|
$loginName = $this->escapeFilterPart($loginName); |
| 675 |
|
$filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter); |
| 676 |
|
$users = $this->fetchListOfUsers($filter, $attributes); |
| 677 |
|
return $users; |
| 678 |
|
} |
| 679 |
|
|
| 680 |
|
/** |
| 681 |
|
* counts the number of users according to a provided loginName and |
|
@@ 687-692 (lines=6) @@
|
| 684 |
|
* @param string $loginName |
| 685 |
|
* @return array |
| 686 |
|
*/ |
| 687 |
|
public function countUsersByLoginName($loginName) { |
| 688 |
|
$loginName = $this->escapeFilterPart($loginName); |
| 689 |
|
$filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter); |
| 690 |
|
$users = $this->countUsers($filter); |
| 691 |
|
return $users; |
| 692 |
|
} |
| 693 |
|
|
| 694 |
|
/** |
| 695 |
|
* @param string $filter |