private readonly CheckoutRegisterPageLoader
$registerPageLoader,
private readonly SystemConfigService
$systemConfigService,
private readonly EntityRepository
$customerRepository,
private readonly AbstractCustomerGroupRegistrationPageLoader
$customerGroupRegistrationPageLoader,
private readonly EntityRepository
$domainRepository ) { } #[Route(path: '/account/register', name: 'frontend.account.register.page', defaults: ['_noStore' => true], methods: ['GET'])]
public function accountRegisterPage(Request
$request, RequestDataBag
$data, SalesChannelContext
$context): Response
{ if ($context->
getCustomer() &&
$context->
getCustomer()->
getGuest()) { return $this->
redirectToRoute('frontend.account.logout.page'
);
} if ($context->
getCustomer()) { return $this->
redirectToRoute('frontend.account.home.page'
);
} $redirect =
$request->query->
get('redirectTo', 'frontend.account.home.page'
);
$errorRoute =
$request->attributes->
get('_route'
);
$page =
$this->loginPageLoader->
load($request,
$context);