Skip to content

Commit

Permalink
Merge pull request #58 from haase-fabian/master
Browse files Browse the repository at this point in the history
TASK: replace whitelistObject() with new allowObject()
  • Loading branch information
skurfuerst authored May 16, 2022
2 parents 282f2e3 + b52d66e commit e49e8f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/RegistrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function activateAccountAction($token)

$user = $this->userCreationService->createUserAndAccount($registrationFlow);
$this->registrationFlowRepository->remove($registrationFlow);
$this->persistenceManager->whitelistObject($registrationFlow);
$this->persistenceManager->allowObject($registrationFlow);

$this->view->assign('success', true);
$this->view->assign('user', $user);
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Service/Flow/FlowUserCreationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function createUserAndAccount(RegistrationFlow $registrationFlow)

// Persist user
$this->userRepository->add($user);
$this->persistenceManager->whitelistObject($user);
$this->persistenceManager->whitelistObject($account);
$this->persistenceManager->allowObject($user);
$this->persistenceManager->allowObject($account);

// Return the user so the controller can directly use it
return $user;
Expand Down
8 changes: 4 additions & 4 deletions Classes/Domain/Service/Neos/NeosUserCreationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public function createUserAndAccount(RegistrationFlow $registrationFlow)
$this->getPartyService()->assignAccountToParty($account, $user);
$this->getPartyRepository()->add($user);
$this->accountRepository->add($account);
$this->persistenceManager->whitelistObject($user);
$this->persistenceManager->whitelistObject($user->getPreferences());
$this->persistenceManager->whitelistObject($name);
$this->persistenceManager->whitelistObject($account);
$this->persistenceManager->allowObject($user);
$this->persistenceManager->allowObject($user->getPreferences());
$this->persistenceManager->allowObject($name);
$this->persistenceManager->allowObject($account);

// Return the user so the controller can directly use it
return $user;
Expand Down

0 comments on commit e49e8f6

Please sign in to comment.