Skip to content
Snippets Groups Projects
Commit 727be76d authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Remove getPersonsByNameAndBirthDate implementation

The method is gone from the interface
parent f6d094a6
No related branches found
No related tags found
No related merge requests found
Pipeline #86115 passed
...@@ -189,40 +189,6 @@ class LDAPApi implements LoggerAwareInterface, ServiceSubscriberInterface ...@@ -189,40 +189,6 @@ class LDAPApi implements LoggerAwareInterface, ServiceSubscriberInterface
return $persons; return $persons;
} }
/**
* @return Person[]
*/
public function getPersonsByNameAndBirthDate(string $givenName, string $familyName, string $birthDate): array
{
if ($this->birthdayAttributeName === '') {
return [];
}
try {
$provider = $this->getProvider();
$builder = $this->getCachedBuilder($provider);
/** @var User[] $users */
$users = $builder
->where('objectClass', '=', $provider->getSchema()->person())
->whereEquals($this->givenNameAttributeName, $givenName)
->whereEquals($this->familyNameAttributeName, $familyName)
->whereEquals($this->birthdayAttributeName, $birthDate) // (e.g. 1981-07-18)
->sortBy($this->familyNameAttributeName, 'asc')->paginate($this->PAGESIZE)->getResults();
$people = [];
foreach ($users as $user) {
$people[] = $this->personFromUserItem($user, true);
}
return $people;
} catch (\Adldap\Auth\BindException $e) {
// There was an issue binding / connecting to the server.
throw new ApiError(Response::HTTP_BAD_GATEWAY, sprintf('Persons could not be loaded! Message: %s', CoreTools::filterErrorMessage($e->getMessage())));
}
}
public function getPersonUserItem(string $identifier): ?User public function getPersonUserItem(string $identifier): ?User
{ {
$preEvent = new PersonUserItemPreEvent($identifier); $preEvent = new PersonUserItemPreEvent($identifier);
......
...@@ -21,11 +21,6 @@ class LDAPPersonProvider implements PersonProviderInterface ...@@ -21,11 +21,6 @@ class LDAPPersonProvider implements PersonProviderInterface
return $this->ldapApi->getPersons($filters); return $this->ldapApi->getPersons($filters);
} }
public function getPersonsByNameAndBirthDate(string $givenName, string $familyName, string $birthDate): array
{
return $this->ldapApi->getPersonsByNameAndBirthDate($givenName, $familyName, $birthDate);
}
public function getPerson(string $id): Person public function getPerson(string $id): Person
{ {
return $this->ldapApi->getPerson($id); return $this->ldapApi->getPerson($id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment