Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ForgotPassword.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
13 
15 {
19  protected $resultPageFactory;
20 
24  protected $session;
25 
31  public function __construct(
32  Context $context,
33  Session $customerSession,
35  ) {
36  $this->session = $customerSession;
37  $this->resultPageFactory = $resultPageFactory;
38  parent::__construct($context);
39  }
40 
46  public function execute()
47  {
49  $resultPage = $this->resultPageFactory->create();
50  $resultPage->getLayout()->getBlock('forgotPassword')->setEmailValue($this->session->getForgottenEmail());
51 
52  $this->session->unsForgottenEmail();
53 
54  return $resultPage;
55  }
56 }
__construct(Context $context, Session $customerSession, PageFactory $resultPageFactory)