Login.php 825 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Multishipping\Controller\Checkout;
  8. class Login extends \Magento\Multishipping\Controller\Checkout
  9. {
  10. /**
  11. * Multishipping checkout login page
  12. *
  13. * @return void
  14. */
  15. public function execute()
  16. {
  17. if ($this->_objectManager->get(\Magento\Customer\Model\Session::class)->isLoggedIn()) {
  18. $this->_redirect('*/*/');
  19. return;
  20. }
  21. $this->_view->loadLayout();
  22. // set account create url
  23. $loginForm = $this->_view->getLayout()->getBlock('customer.new');
  24. if ($loginForm) {
  25. $loginForm->setCreateAccountUrl($this->_getHelper()->getMSRegisterUrl());
  26. }
  27. $this->_view->renderLayout();
  28. }
  29. }