protected function onSuccess(UserInterface $user, $confirmation)
 {
     if ($confirmation) {
         $user->setEnabled(false);
         if (null === $user->getConfirmationToken()) {
             $user->setConfirmationToken($this->tokenGenerator->generateToken());
         }
         $this->mailer->sendConfirmationEmailMessage($user);
     } else {
         $user->setEnabled(true);
     }
     $user->setRoles(array('ROLE_RIA'));
     $riaCompanyInformation = new RiaCompanyInformation();
     $riaCompanyInformation->setName($user->getProfile()->getCompany());
     $riaCompanyInformation->setRia($user);
     $user->setRiaCompanyInformation($riaCompanyInformation);
     $this->userManager->updateUser($user);
     if ($riaCompanyInformation->getRelationshipType() === RiaCompanyInformation::RELATIONSHIP_TYPE_LICENSE_FEE) {
         $this->feeManager->resetRiaFee($user);
     }
 }
Пример #2
0
 private function createRiaCompanyInformation(ObjectManager $manager, User $riaUser)
 {
     $riaCompanyInfo = new RiaCompanyInformation();
     $riaCompanyInfo->setRia($riaUser);
     $riaCompanyInfo->setAccountManaged(1);
     $riaCompanyInfo->setAddress('Ekvator');
     $riaCompanyInfo->setCity('Nsk');
     $riaCompanyInfo->setAdvCopy('none.pdf');
     $riaCompanyInfo->setClientsTaxBracket(0.12);
     $riaCompanyInfo->setContactEmail('contact_' . $riaUser->getEmail());
     $riaCompanyInfo->setIsAllowRetirementPlan(true);
     $riaCompanyInfo->setIsSearchableDb(true);
     $riaCompanyInfo->setIsShowClientExpectedAssetClass(true);
     $riaCompanyInfo->setMinAssetSize(10000);
     $riaCompanyInfo->setMinimumBillingFee(10);
     $riaCompanyInfo->setName('Wealthbot');
     $riaCompanyInfo->setOffice('408');
     $riaCompanyInfo->setState($this->getReference('state-Nevada'));
     $riaCompanyInfo->setPhoneNumber('3333333333');
     $riaCompanyInfo->setPortfolioModel(NULL);
     $riaCompanyInfo->setPrimaryFirstName('RiaFirst');
     $riaCompanyInfo->setPrimaryLastName('RiaLast');
     $riaCompanyInfo->setRebalancedFrequency(1);
     $riaCompanyInfo->setRebalancedMethod(1);
     $riaCompanyInfo->setRiskAdjustment(1);
     $riaCompanyInfo->setUseMunicipalBond(true);
     $riaCompanyInfo->setWebsite('leningrad.com');
     $riaCompanyInfo->setZipcode('12334');
     $riaCompanyInfo->setAllowNonElectronicallySigning(true);
     $riaCompanyInfo->setPortfolioModel($this->createRiaPortfolioModel($manager, $riaUser));
     $riaCompanyInfo->setPortfolioProcessing(RiaCompanyInformation::PORTFOLIO_PROCESSING_COLLABORATIVE);
     $riaCompanyInfo->setTaxLossHarvestingMinimumPercent(10);
     /** @var Custodian $custodian */
     $custodian = $this->getReference('custodian-td-ameritrade');
     $riaCompanyInfo->setCustodian($custodian);
     $manager->persist($riaCompanyInfo);
     return $riaCompanyInfo;
 }
Пример #3
0
 private function createRiaCompanyInformation(User $riaUser)
 {
     $riaCompanyInfo = new RiaCompanyInformation();
     $riaCompanyInfo->setRia($riaUser);
     $riaCompanyInfo->setState($this->getReference('state-New York'));
     $riaCompanyInfo->setName('Mortal Kombat Advisors');
     $riaCompanyInfo->setPrimaryFirstName('Lord');
     $riaCompanyInfo->setPrimaryLastName('Raiden');
     $riaCompanyInfo->setWebsite('http://www.wealthbot.io');
     $riaCompanyInfo->setAddress('1 Commercial St');
     $riaCompanyInfo->setOffice('Suite 555');
     $riaCompanyInfo->setCity('New York');
     $riaCompanyInfo->setZipcode('12334');
     $riaCompanyInfo->setPhoneNumber('5558588888');
     $riaCompanyInfo->setContactEmail('*****@*****.**');
     $riaCompanyInfo->setAccountManaged(3);
     $riaCompanyInfo->setIsAllowRetirementPlan(true);
     $riaCompanyInfo->setMinimumBillingFee(500);
     $riaCompanyInfo->setIsShowClientExpectedAssetClass(true);
     $riaCompanyInfo->setClientsTaxBracket(0.1);
     $riaCompanyInfo->setUseMunicipalBond(true);
     $riaCompanyInfo->setRebalancedMethod(1);
     $riaCompanyInfo->setRebalancedFrequency(4);
     $riaCompanyInfo->setIsSearchableDb(true);
     $riaCompanyInfo->setMinAssetSize(50000);
     $riaCompanyInfo->setActivated(true);
     $riaCompanyInfo->setTransactionAmount(200);
     $riaCompanyInfo->setIsTransactionFees(true);
     $riaCompanyInfo->setIsTransactionMinimums(true);
     $riaCompanyInfo->setIsTransactionRedemptionFees(true);
     $riaCompanyInfo->setIsTaxLossHarvesting(true);
     $riaCompanyInfo->setTaxLossHarvesting(50000);
     $riaCompanyInfo->setTaxLossHarvestingPercent(0.1);
     $riaCompanyInfo->setTaxLossHarvestingMinimum(100);
     $riaCompanyInfo->setTaxLossHarvestingMinimumPercent(0.1);
     $riaCompanyInfo->setIsUseQualifiedModels(false);
     $riaCompanyInfo->setPortfolioProcessing(RiaCompanyInformation::PORTFOLIO_PROCESSING_COLLABORATIVE);
     $riaCompanyInfo->setAllowNonElectronicallySigning(true);
     $riaCompanyInfo->setStopTlhValue(4.2);
     /** @var Custodian $custodian */
     $custodian = $this->getReference('custodian-td-ameritrade');
     $riaCompanyInfo->setCustodian($custodian);
     return $riaCompanyInfo;
 }