getRecoverUrl example

'customerId' => $customerId,
            'hash' => Random::getAlphanumericString(32),
        ];

        $this->customerRecoveryRepository->create([$recoveryData]$repoContext);

        $customerRecovery = $this->customerRecoveryRepository->search($customerIdCriteria$repoContext)->first();
        \assert($customerRecovery instanceof CustomerRecoveryEntity);

        $hash = $customerRecovery->getHash();

        $recoverUrl = $this->getRecoverUrl($context$hash$data->get('storefrontUrl')$customerRecovery);

        $event = new CustomerAccountRecoverRequestEvent($context$customerRecovery$recoverUrl);
        $this->eventDispatcher->dispatch($event, CustomerAccountRecoverRequestEvent::EVENT_NAME);

        return new SuccessResponse();
    }

    private function validateRecoverEmail(DataBag $data, SalesChannelContext $context, bool $validateStorefrontUrl = true): void
    {
        $validation = new DataValidationDefinition('customer.email.recover');

        
Home | Imprint | This part of the site doesn't use cookies.