/**
  * @param Model\Person $registrant
  */
 private function updateRegistrantIfFeUserRecordDiffers(Model\Person $registrant)
 {
     if ($registrant->getFeUser() instanceof \Ecom\EcomToolbox\Domain\Model\User && $registrant->hasUpdatedFeRecord()) {
         $this->personRepository->update($registrant);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param \S3b0\ProjectRegistration\Domain\Model\Person $person
  *
  * @return bool|\S3b0\ProjectRegistration\Domain\Model\Person
  */
 public function findOneByMandatoryFields(\S3b0\ProjectRegistration\Domain\Model\Person $person)
 {
     $query = $this->createQuery();
     $result = $query->matching($query->logicalAnd([$query->equals('name', $person->getName()), $query->equals('company', $person->getCompany()), $query->equals('email', $person->getEmail()), $query->equals('phone', $person->getPhone()), $query->equals('city', ''), $query->equals('site', ''), $query->equals('country', '0'), $query->equals('state', '0')]))->execute()->getFirst();
     return $result instanceof \S3b0\ProjectRegistration\Domain\Model\Person ? $result : false;
 }