12 use Magento\User\Model\UserFactory;
35 UserFactory $userFactory
37 parent::__construct($context);
38 $this->_userFactory = $userFactory;
49 protected function _validateResetPasswordLinkToken($userId, $resetPasswordToken)
55 ) || empty($resetPasswordToken) || empty($userId) || $userId < 0
61 $user = $this->_userFactory->create()->load($userId);
62 if (!
$user->getId()) {
63 throw new LocalizedException(
64 __(
'Please specify the correct account and try again.')
68 $userToken =
$user->getRpToken();
70 throw new LocalizedException(
__(
'Your password reset link has expired.'));
__construct(Context $context, UserFactory $userFactory)
static compareStrings($expected, $actual)