|
1 | 1 | <?php
|
2 | 2 | /**
|
3 |
| - * |
4 | 3 | * Copyright © Magento, Inc. All rights reserved.
|
5 | 4 | * See COPYING.txt for license details.
|
6 | 5 | */
|
7 | 6 | namespace Magento\Customer\Controller\Account;
|
8 | 7 |
|
| 8 | +use Magento\Customer\Api\AccountManagementInterface; |
| 9 | +use Magento\Customer\Controller\AbstractAccount; |
| 10 | +use Magento\Customer\Model\Session; |
9 | 11 | use Magento\Customer\Model\Url;
|
| 12 | +use Magento\Framework\App\ActionInterface as ActionInterface; |
10 | 13 | use Magento\Framework\App\Action\Context;
|
11 |
| -use Magento\Customer\Model\Session; |
12 | 14 | use Magento\Framework\App\ObjectManager;
|
| 15 | +use Magento\Framework\Exception\State\InvalidTransitionException; |
13 | 16 | use Magento\Framework\View\Result\PageFactory;
|
14 | 17 | use Magento\Store\Model\StoreManagerInterface;
|
15 |
| -use Magento\Customer\Api\AccountManagementInterface; |
16 |
| -use Magento\Framework\Exception\State\InvalidTransitionException; |
17 | 18 |
|
18 |
| -class Confirmation extends \Magento\Customer\Controller\AbstractAccount |
| 19 | +/** |
| 20 | + * Class Confirmation. Send confirmation link to specified email |
| 21 | + */ |
| 22 | +class Confirmation extends AbstractAccount implements ActionInterface |
19 | 23 | {
|
20 | 24 | /**
|
21 | 25 | * @var \Magento\Store\Model\StoreManagerInterface
|
@@ -91,11 +95,11 @@ public function execute()
|
91 | 95 | $email,
|
92 | 96 | $this->storeManager->getStore()->getWebsiteId()
|
93 | 97 | );
|
94 |
| - $this->messageManager->addSuccess(__('Please check your email for confirmation key.')); |
| 98 | + $this->messageManager->addSuccessMessage(__('Please check your email for confirmation key.')); |
95 | 99 | } catch (InvalidTransitionException $e) {
|
96 |
| - $this->messageManager->addSuccess(__('This email does not require confirmation.')); |
| 100 | + $this->messageManager->addSuccessMessage(__('This email does not require confirmation.')); |
97 | 101 | } catch (\Exception $e) {
|
98 |
| - $this->messageManager->addException($e, __('Wrong email.')); |
| 102 | + $this->messageManager->addExceptionMessage($e, __('Wrong email.')); |
99 | 103 | $resultRedirect->setPath('*/*/*', ['email' => $email, '_secure' => true]);
|
100 | 104 | return $resultRedirect;
|
101 | 105 | }
|
|
0 commit comments