Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Jul 21, 2020
1 parent 03a5ff3 commit 241f76d
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ public function handleCreateIdentityCommand(CreateIdentityCommand $command)
$preferredLocale = new Locale($command->preferredLocale);
$this->assertIsValidLocale($preferredLocale);

$institution = new Institution($command->institution);

$identity = Identity::create(
new IdentityId($command->id),
new Institution($command->institution),
Expand Down Expand Up @@ -431,28 +429,4 @@ private function emailVerificationIsRequired(IdentityApi $identity)

return $configuration->verifyEmailOption->isEnabled();
}

/**
* @deprecated Should be used until existing institution configurations have been migrated to using normalized ids
*
* @param Institution $institution
* @return InstitutionConfiguration
*/
private function loadInstitutionConfigurationFor(Institution $institution)
{
$institution = new ConfigurationInstitution($institution->getInstitution());
try {
$institutionConfigurationId = InstitutionConfigurationId::normalizedFrom($institution);
$institutionConfiguration = $this->institutionConfigurationRepository->load(
$institutionConfigurationId->getInstitutionConfigurationId()
);
} catch (AggregateNotFoundException $exception) {
$institutionConfigurationId = InstitutionConfigurationId::from($institution);
$institutionConfiguration = $this->institutionConfigurationRepository->load(
$institutionConfigurationId->getInstitutionConfigurationId()
);
}

return $institutionConfiguration;
}
}

0 comments on commit 241f76d

Please sign in to comment.