質問

I have an observer that is triggered when a user creates an account. In the execute method I have the following code:

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $redirectionUrl = $this->url->getUrl('subscribe');
    $this->responseFactory->create()->setRedirect($redirectionUrl)->sendResponse();
    exit;
}

It does infact redirect as expected, but the user is not logged in after registration.

How can I redirect without having to use exit? If I remove exit the redirect doesn't happen.

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top