|
28 | 28 | use Magento\Framework\App\Area;
|
29 | 29 | use Magento\Framework\App\Config\ScopeConfigInterface;
|
30 | 30 | use Magento\Framework\App\ObjectManager;
|
| 31 | +use Magento\Framework\AuthorizationInterface; |
31 | 32 | use Magento\Framework\DataObjectFactory as ObjectFactory;
|
32 | 33 | use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
|
33 | 34 | use Magento\Framework\Encryption\Helper\Security;
|
|
55 | 56 | use Magento\Store\Model\ScopeInterface;
|
56 | 57 | use Magento\Store\Model\StoreManagerInterface;
|
57 | 58 | use Psr\Log\LoggerInterface as PsrLogger;
|
58 |
| -use Magento\Framework\AuthorizationInterface; |
59 | 59 |
|
60 | 60 | /**
|
61 | 61 | * Handle various customer account actions
|
@@ -1461,15 +1461,14 @@ public function changeResetPasswordLinkToken($customer, $passwordLinkToken)
|
1461 | 1461 | )
|
1462 | 1462 | );
|
1463 | 1463 | }
|
1464 |
| - if (is_string($passwordLinkToken) && !empty($passwordLinkToken)) { |
1465 |
| - $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); |
1466 |
| - $customerSecure->setRpToken($passwordLinkToken); |
1467 |
| - $customerSecure->setRpTokenCreatedAt( |
1468 |
| - $this->dateTimeFactory->create()->format(DateTime::DATETIME_PHP_FORMAT) |
1469 |
| - ); |
1470 |
| - $this->setIgnoreValidationFlag($customer); |
1471 |
| - $this->customerRepository->save($customer); |
1472 |
| - } |
| 1464 | + $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId()); |
| 1465 | + $customerSecure->setRpToken($passwordLinkToken); |
| 1466 | + $customerSecure->setRpTokenCreatedAt( |
| 1467 | + $this->dateTimeFactory->create()->format(DateTime::DATETIME_PHP_FORMAT) |
| 1468 | + ); |
| 1469 | + $this->setIgnoreValidationFlag($customer); |
| 1470 | + $this->customerRepository->save($customer); |
| 1471 | + |
1473 | 1472 | return true;
|
1474 | 1473 | }
|
1475 | 1474 |
|
|
0 commit comments