diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php index 8b14beb54..2b6186675 100644 --- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php +++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/CommandHandler/IdentityCommandHandler.php @@ -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), @@ -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; - } }