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