Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Attributes
Data Class Reference
Inheritance diagram for Data:
AbstractHelper

Public Member Functions

 __construct (\Magento\Framework\App\Helper\Context $context, \Magento\Backend\App\ConfigInterface $config, \Magento\Framework\Math\Random $mathRandom)
 
 generateResetPasswordLinkToken ()
 
 getResetPasswordLinkExpirationPeriod ()
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Data Fields

const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD = 'admin/security/password_reset_link_expiration_period'
 

Protected Attributes

 $_config
 
 $mathRandom
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 

Detailed Description

User data helper

@api

Since
100.0.2

Definition at line 14 of file Data.php.

Constructor & Destructor Documentation

◆ __construct()

Parameters
\Magento\Framework\App\Helper\Context$context
\Magento\Backend\App\ConfigInterface$config
\Magento\Framework\Math\Random$mathRandom

Definition at line 36 of file Data.php.

40  {
41  $this->_config = $config;
42  $this->mathRandom = $mathRandom;
43  parent::__construct($context);
44  }
$config
Definition: fraud_order.php:17

Member Function Documentation

◆ generateResetPasswordLinkToken()

generateResetPasswordLinkToken ( )

Generate unique token for reset password confirmation link

Returns
string

Definition at line 51 of file Data.php.

52  {
53  return $this->mathRandom->getUniqueHash();
54  }

◆ getResetPasswordLinkExpirationPeriod()

getResetPasswordLinkExpirationPeriod ( )

Retrieve customer reset password link expiration period in days

Returns
int

Definition at line 61 of file Data.php.

62  {
63  return (int)$this->_config->getValue(self::XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD);
64  }

Field Documentation

◆ $_config

$_config
protected

Definition at line 24 of file Data.php.

◆ $mathRandom

$mathRandom
protected

Definition at line 29 of file Data.php.

◆ XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD

const XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD = 'admin/security/password_reset_link_expiration_period'

Configuration path to expiration period of reset password link

Definition at line 19 of file Data.php.


The documentation for this class was generated from the following file: