sessionHelper->isPersistent()) { $this->cleanup(); } /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); $resultRedirect->setPath('customer/account/login'); return $resultRedirect; } /** * Revert all persistent data * * @return $this */ protected function cleanup() { $this->_eventManager->dispatch('persistent_session_expired'); $this->customerSession->setCustomerId(null)->setCustomerGroupId(null); if ($this->clearCheckoutSession) { $this->checkoutSession->clearStorage(); } $this->sessionHelper->getSession()->removePersistentCookie(); return $this; } }