Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Login.php
Go to the documentation of this file.
1 <?php
8 
10 {
16  public function execute()
17  {
18  if ($this->_objectManager->get(\Magento\Customer\Model\Session::class)->isLoggedIn()) {
19  $this->_redirect('*/*/');
20  return;
21  }
22 
23  $this->_view->loadLayout();
24 
25  // set account create url
26  $loginForm = $this->_view->getLayout()->getBlock('customer.new');
27  if ($loginForm) {
28  $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl());
29  }
30  $this->_view->renderLayout();
31  }
32 }
_redirect($path, $arguments=[])
Definition: Action.php:167