Skip to content

Commit 667aa25

Browse files
Fixed static tests failures
1 parent 7032427 commit 667aa25

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Magento\Framework\App\Area;
2929
use Magento\Framework\App\Config\ScopeConfigInterface;
3030
use Magento\Framework\App\ObjectManager;
31+
use Magento\Framework\AuthorizationInterface;
3132
use Magento\Framework\DataObjectFactory as ObjectFactory;
3233
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
3334
use Magento\Framework\Encryption\Helper\Security;
@@ -55,7 +56,6 @@
5556
use Magento\Store\Model\ScopeInterface;
5657
use Magento\Store\Model\StoreManagerInterface;
5758
use Psr\Log\LoggerInterface as PsrLogger;
58-
use Magento\Framework\AuthorizationInterface;
5959

6060
/**
6161
* Handle various customer account actions
@@ -1461,15 +1461,14 @@ public function changeResetPasswordLinkToken($customer, $passwordLinkToken)
14611461
)
14621462
);
14631463
}
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+
14731472
return true;
14741473
}
14751474

0 commit comments

Comments
 (0)