| @@ 168-176 (lines=9) @@ | ||
| 165 | * @param array $attributes Restrict to specific AD attributes. An empty array will return all attributes |
|
| 166 | * @return array |
|
| 167 | */ |
|
| 168 | public function getGroupByGUID($guid, $baseDn = null, $scope = Ldap::SEARCH_SCOPE_SUB, $attributes = []) |
|
| 169 | { |
|
| 170 | return $this->search( |
|
| 171 | sprintf('(&(objectClass=group)(objectGUID=%s))', LDAPUtil::str_to_hex_guid($guid, true)), |
|
| 172 | $baseDn, |
|
| 173 | $scope, |
|
| 174 | $attributes |
|
| 175 | ); |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * Return a particular LDAP group by DN value. |
|
| @@ 225-233 (lines=9) @@ | ||
| 222 | * @param string $guid |
|
| 223 | * @return array |
|
| 224 | */ |
|
| 225 | public function getUserByGUID($guid, $baseDn = null, $scope = Ldap::SEARCH_SCOPE_SUB, $attributes = []) |
|
| 226 | { |
|
| 227 | return $this->search( |
|
| 228 | sprintf('(&(objectClass=user)(objectGUID=%s))', LDAPUtil::str_to_hex_guid($guid, true)), |
|
| 229 | $baseDn, |
|
| 230 | $scope, |
|
| 231 | $attributes |
|
| 232 | ); |
|
| 233 | } |
|
| 234 | ||
| 235 | /** |
|
| 236 | * Return a particular LDAP user by DN value. |
|