Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Data.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\User\Helper;
7 
15 {
19  const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD = 'admin/security/password_reset_link_expiration_period';
20 
24  protected $_config;
25 
29  protected $mathRandom;
30 
36  public function __construct(
37  \Magento\Framework\App\Helper\Context $context,
38  \Magento\Backend\App\ConfigInterface $config,
39  \Magento\Framework\Math\Random $mathRandom
40  ) {
41  $this->_config = $config;
42  $this->mathRandom = $mathRandom;
43  parent::__construct($context);
44  }
45 
52  {
53  return $this->mathRandom->getUniqueHash();
54  }
55 
62  {
63  return (int)$this->_config->getValue(self::XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD);
64  }
65 }
__construct(\Magento\Framework\App\Helper\Context $context, \Magento\Backend\App\ConfigInterface $config, \Magento\Framework\Math\Random $mathRandom)
Definition: Data.php:36
$config
Definition: fraud_order.php:17
const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD
Definition: Data.php:19
getResetPasswordLinkExpirationPeriod()
Definition: Data.php:61
generateResetPasswordLinkToken()
Definition: Data.php:51