/**
* @param string $employeeId
* @return \Adldap\Models\Entry
* @throws UserNotFoundException
*/
public function findUser($employeeId)
{
$this->connect();
$criteria = $this->getSearchCriteria();
try {
/** @var \Adldap\Models\Entry $user */
$user = $this->ldapProvider->search()->select($criteria)->findByOrFail($this->employeeIdAttribute, $employeeId);
} catch (\Exception $e) {
throw new UserNotFoundException('User not found', 1463493653, $e);
}
return $user;
}