Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function loadUserByUsername($username)
 {
     $credentials = $this->accountCredentialsRepository->findByEmail(new EmailAddress($username));
     if (!$credentials) {
         throw new UsernameNotFoundException();
     }
     return AccountUser::fromAccountCredentials($credentials);
 }
 public function applyAccountWasCreated(AccountWasCreated $event)
 {
     $accountCredentials = new AccountCredentials($event->getId(), $event->getCredentials());
     $this->repository->save($accountCredentials);
 }