34 parent::__construct($context);
44 if ($this->_auth->isLoggedIn()) {
45 if ($this->_auth->getAuthStorage()->isFirstPageAfterLogin()) {
46 $this->_auth->getAuthStorage()->setIsFirstPageAfterLogin(
true);
48 return $this->getRedirect($this->_backendUrl->getStartupPageUrl());
52 $backendUrl = $this->
getUrl(
'*');
54 if ($requestUrl != $backendUrl) {
55 return $this->getRedirect($backendUrl);
57 return $this->resultPageFactory->create();
66 private function getRedirect(
$path)
69 $resultRedirect = $this->resultRedirectFactory->create();
70 $resultRedirect->setPath(
$path);
71 return $resultRedirect;
getUrl($route='', $params=[])
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)