| @@ 155-163 (lines=9) @@ | ||
| 152 | * @param array $attributes Restrict to specific AD attributes. An empty array will return all attributes |
|
| 153 | * @return array |
|
| 154 | */ |
|
| 155 | public function getGroupByGUID($guid, $baseDn = null, $scope = Ldap::SEARCH_SCOPE_SUB, $attributes = []) |
|
| 156 | { |
|
| 157 | return $this->search( |
|
| 158 | sprintf('(&(objectClass=group)(objectGUID=%s))', LDAPUtil::str_to_hex_guid($guid, true)), |
|
| 159 | $baseDn, |
|
| 160 | $scope, |
|
| 161 | $attributes |
|
| 162 | ); |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * Return a particular LDAP group by DN value. |
|
| @@ 210-218 (lines=9) @@ | ||
| 207 | * @param string $guid |
|
| 208 | * @return array |
|
| 209 | */ |
|
| 210 | public function getUserByGUID($guid, $baseDn = null, $scope = Ldap::SEARCH_SCOPE_SUB, $attributes = []) |
|
| 211 | { |
|
| 212 | return $this->search( |
|
| 213 | sprintf('(&(objectClass=user)(objectGUID=%s))', LDAPUtil::str_to_hex_guid($guid, true)), |
|
| 214 | $baseDn, |
|
| 215 | $scope, |
|
| 216 | $attributes |
|
| 217 | ); |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * Return a particular LDAP user by DN value. |
|