Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
AccountConfirmation Class Reference

Public Member Functions

 __construct (ScopeConfigInterface $scopeConfig, Registry $registry)
 
 isConfirmationRequired ($websiteId, $customerId, $customerEmail)
 

Data Fields

const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'
 

Detailed Description

Class AccountConfirmation. Checks if email confirmation required for customer.

Definition at line 16 of file AccountConfirmation.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ScopeConfigInterface  $scopeConfig,
Registry  $registry 
)
Parameters
ScopeConfigInterface$scopeConfig
Registry$registry

Definition at line 37 of file AccountConfirmation.php.

40  {
41  $this->scopeConfig = $scopeConfig;
42  $this->registry = $registry;
43  }

Member Function Documentation

◆ isConfirmationRequired()

isConfirmationRequired (   $websiteId,
  $customerId,
  $customerEmail 
)

Check if accounts confirmation is required.

Parameters
int | null$websiteId
int | null$customerId
string$customerEmail
Returns
bool

Definition at line 53 of file AccountConfirmation.php.

53  : bool
54  {
55  if ($this->canSkipConfirmation($customerId, $customerEmail)) {
56  return false;
57  }
58 
59  return (bool)$this->scopeConfig->getValue(
60  self::XML_PATH_IS_CONFIRM,
61  ScopeInterface::SCOPE_WEBSITES,
63  );
64  }

Field Documentation

◆ XML_PATH_IS_CONFIRM

const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'

Configuration path for email confirmation.

Definition at line 21 of file AccountConfirmation.php.


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