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

Public Member Functions

 __construct (CustomerFactory $customerFactory, ManagerInterface $eventManager, StoreManagerInterface $storeManager, Random $mathRandom, Validator $validator, ValidationResultsInterfaceFactory $validationResultsDataFactory, AddressRepositoryInterface $addressRepository, CustomerMetadataInterface $customerMetadataService, CustomerRegistry $customerRegistry, PsrLogger $logger, Encryptor $encryptor, ConfigShare $configShare, StringHelper $stringHelper, CustomerRepositoryInterface $customerRepository, ScopeConfigInterface $scopeConfig, TransportBuilder $transportBuilder, DataObjectProcessor $dataProcessor, Registry $registry, CustomerViewHelper $customerViewHelper, DateTime $dateTime, CustomerModel $customerModel, ObjectFactory $objectFactory, ExtensibleDataObjectConverter $extensibleDataObjectConverter, CredentialsValidator $credentialsValidator=null, DateTimeFactory $dateTimeFactory=null, AccountConfirmation $accountConfirmation=null, SessionManagerInterface $sessionManager=null, SaveHandlerInterface $saveHandler=null, CollectionFactory $visitorCollectionFactory=null, SearchCriteriaBuilder $searchCriteriaBuilder=null)
 
 resendConfirmation ($email, $websiteId=null, $redirectUrl='')
 
 activate ($email, $confirmationKey)
 
 activateById ($customerId, $confirmationKey)
 
 authenticate ($username, $password)
 
 validateResetPasswordLinkToken ($customerId, $resetPasswordLinkToken)
 
 initiatePasswordReset ($email, $template, $websiteId=null)
 
 resetPassword ($email, $resetToken, $newPassword)
 
 getConfirmationStatus ($customerId)
 
 createAccount (CustomerInterface $customer, $password=null, $redirectUrl='')
 
 createAccountWithPasswordHash (CustomerInterface $customer, $hash, $redirectUrl='')
 
 getDefaultBillingAddress ($customerId)
 
 getDefaultShippingAddress ($customerId)
 
 changePassword ($email, $currentPassword, $newPassword)
 
 changePasswordById ($customerId, $currentPassword, $newPassword)
 
 validate (CustomerInterface $customer)
 
 isEmailAvailable ($customerEmail, $websiteId=null)
 
 isCustomerInStore ($customerWebsiteId, $storeId)
 
 isReadonly ($customerId)
 
 isResetPasswordLinkTokenExpired ($rpToken, $rpTokenCreatedAt)
 
 changeResetPasswordLinkToken ($customer, $passwordLinkToken)
 
 sendPasswordReminderEmail ($customer)
 
 sendPasswordResetConfirmationEmail ($customer)
 
 getPasswordHash ($password)
 

Data Fields

const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template'
 
const XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE = 'customer/create_account/email_no_password_template'
 
const XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity'
 
const XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template'
 
const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template'
 
const XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity'
 
const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'
 
const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template'
 
const XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template'
 
const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered'
 
const NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD = 'registered_no_password'
 
const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation'
 
const NEW_ACCOUNT_EMAIL_CONFIRMED = 'confirmed'
 
const EMAIL_REMINDER = 'email_reminder'
 
const EMAIL_RESET = 'email_reset'
 
const XML_PATH_MINIMUM_PASSWORD_LENGTH = 'customer/password/minimum_password_length'
 
const XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER = 'customer/password/required_character_classes_number'
 
const XML_PATH_RESET_PASSWORD_TEMPLATE = 'customer/password/reset_password_template'
 
const MIN_PASSWORD_LENGTH = 6
 

Protected Member Functions

 checkPasswordStrength ($password)
 
 makeRequiredCharactersCheck ($password)
 
 getMinPasswordLength ()
 
 sendEmailConfirmation (CustomerInterface $customer, $redirectUrl)
 
 createPasswordHash ($password)
 
 sendNewAccountEmail ( $customer, $type=self::NEW_ACCOUNT_EMAIL_REGISTERED, $backUrl='', $storeId='0', $sendemailStoreId=null)
 
 sendPasswordResetNotificationEmail ($customer)
 
 getWebsiteStoreId ($customer, $defaultStoreId=null)
 
 getTemplateTypes ()
 
 sendEmailTemplate ( $customer, $template, $sender, $templateParams=[], $storeId=null, $email=null)
 
 isConfirmationRequired ($customer)
 
 canSkipConfirmation ($customer)
 
 getAddressById (CustomerInterface $customer, $addressId)
 
 getFullCustomerObject ($customer)
 

Protected Attributes

 $logger
 
 $stringHelper
 
 $dataProcessor
 
 $registry
 
 $customerViewHelper
 
 $dateTime
 
 $objectFactory
 
 $extensibleDataObjectConverter
 
 $customerModel
 
 $authentication
 

Detailed Description

Handle various customer account actions

@SuppressWarnings(PHPMD.CouplingBetweenObjects) @SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.ExcessiveClassComplexity)

Definition at line 64 of file AccountManagement.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( CustomerFactory  $customerFactory,
ManagerInterface  $eventManager,
StoreManagerInterface  $storeManager,
Random  $mathRandom,
Validator  $validator,
ValidationResultsInterfaceFactory  $validationResultsDataFactory,
AddressRepositoryInterface  $addressRepository,
CustomerMetadataInterface  $customerMetadataService,
CustomerRegistry  $customerRegistry,
PsrLogger  $logger,
Encryptor  $encryptor,
ConfigShare  $configShare,
StringHelper  $stringHelper,
CustomerRepositoryInterface  $customerRepository,
ScopeConfigInterface  $scopeConfig,
TransportBuilder  $transportBuilder,
DataObjectProcessor  $dataProcessor,
Registry  $registry,
CustomerViewHelper  $customerViewHelper,
DateTime  $dateTime,
CustomerModel  $customerModel,
ObjectFactory  $objectFactory,
ExtensibleDataObjectConverter  $extensibleDataObjectConverter,
CredentialsValidator  $credentialsValidator = null,
DateTimeFactory  $dateTimeFactory = null,
AccountConfirmation  $accountConfirmation = null,
SessionManagerInterface  $sessionManager = null,
SaveHandlerInterface  $saveHandler = null,
CollectionFactory  $visitorCollectionFactory = null,
SearchCriteriaBuilder  $searchCriteriaBuilder = null 
)
Parameters
CustomerFactory$customerFactory
ManagerInterface$eventManager
StoreManagerInterface$storeManager
Random$mathRandom
Validator$validator
ValidationResultsInterfaceFactory$validationResultsDataFactory
AddressRepositoryInterface$addressRepository
CustomerMetadataInterface$customerMetadataService
CustomerRegistry$customerRegistry
PsrLogger$logger
Encryptor$encryptor
ConfigShare$configShare
StringHelper$stringHelper
CustomerRepositoryInterface$customerRepository
ScopeConfigInterface$scopeConfig
TransportBuilder$transportBuilder
DataObjectProcessor$dataProcessor
Registry$registry
CustomerViewHelper$customerViewHelper
DateTime$dateTime
CustomerModel$customerModel
ObjectFactory$objectFactory
ExtensibleDataObjectConverter$extensibleDataObjectConverter
CredentialsValidator | null$credentialsValidator
DateTimeFactory | null$dateTimeFactory
AccountConfirmation | null$accountConfirmation
SessionManagerInterface | null$sessionManager
SaveHandlerInterface | null$saveHandler
CollectionFactory | null$visitorCollectionFactory
SearchCriteriaBuilder | null$searchCriteriaBuilder@SuppressWarnings(PHPMD.ExcessiveParameterList)

Definition at line 369 of file AccountManagement.php.

400  {
401  $this->customerFactory = $customerFactory;
402  $this->eventManager = $eventManager;
403  $this->storeManager = $storeManager;
404  $this->mathRandom = $mathRandom;
405  $this->validator = $validator;
406  $this->validationResultsDataFactory = $validationResultsDataFactory;
407  $this->addressRepository = $addressRepository;
408  $this->customerMetadataService = $customerMetadataService;
409  $this->customerRegistry = $customerRegistry;
410  $this->logger = $logger;
411  $this->encryptor = $encryptor;
412  $this->configShare = $configShare;
413  $this->stringHelper = $stringHelper;
414  $this->customerRepository = $customerRepository;
415  $this->scopeConfig = $scopeConfig;
416  $this->transportBuilder = $transportBuilder;
417  $this->dataProcessor = $dataProcessor;
418  $this->registry = $registry;
419  $this->customerViewHelper = $customerViewHelper;
420  $this->dateTime = $dateTime;
421  $this->customerModel = $customerModel;
422  $this->objectFactory = $objectFactory;
423  $this->extensibleDataObjectConverter = $extensibleDataObjectConverter;
424  $this->credentialsValidator =
425  $credentialsValidator ?: ObjectManager::getInstance()->get(CredentialsValidator::class);
426  $this->dateTimeFactory = $dateTimeFactory ?: ObjectManager::getInstance()->get(DateTimeFactory::class);
427  $this->accountConfirmation = $accountConfirmation ?: ObjectManager::getInstance()
428  ->get(AccountConfirmation::class);
429  $this->sessionManager = $sessionManager
430  ?: ObjectManager::getInstance()->get(SessionManagerInterface::class);
431  $this->saveHandler = $saveHandler
432  ?: ObjectManager::getInstance()->get(SaveHandlerInterface::class);
433  $this->visitorCollectionFactory = $visitorCollectionFactory
434  ?: ObjectManager::getInstance()->get(CollectionFactory::class);
435  $this->searchCriteriaBuilder = $searchCriteriaBuilder
436  ?: ObjectManager::getInstance()->get(SearchCriteriaBuilder::class);
437  }

Member Function Documentation

◆ activate()

activate (   $email,
  $confirmationKey 
)

Activate a customer account using a key that was sent in a confirmation email.

Parameters
string$email
string$confirmationKey
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

Implements AccountManagementInterface.

Definition at line 481 of file AccountManagement.php.

482  {
483  $customer = $this->customerRepository->get($email);
484  return $this->activateCustomer($customer, $confirmationKey);
485  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13

◆ activateById()

activateById (   $customerId,
  $confirmationKey 
)

Activate a customer account using a key that was sent in a confirmation email.@api

Parameters
int$customerId
string$confirmationKey
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

Implements AccountManagementInterface.

Definition at line 490 of file AccountManagement.php.

491  {
492  $customer = $this->customerRepository->getById($customerId);
493  return $this->activateCustomer($customer, $confirmationKey);
494  }
$customer
Definition: customers.php:11

◆ authenticate()

authenticate (   $username,
  $password 
)

Authenticate a customer by username and password

Parameters
string$email
string$password
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

Implements AccountManagementInterface.

Definition at line 530 of file AccountManagement.php.

531  {
532  try {
533  $customer = $this->customerRepository->get($username);
534  } catch (NoSuchEntityException $e) {
535  throw new InvalidEmailOrPasswordException(__('Invalid login or password.'));
536  }
537 
538  $customerId = $customer->getId();
539  if ($this->getAuthentication()->isLocked($customerId)) {
540  throw new UserLockedException(__('The account is locked.'));
541  }
542  try {
543  $this->getAuthentication()->authenticate($customerId, $password);
544  } catch (InvalidEmailOrPasswordException $e) {
545  throw new InvalidEmailOrPasswordException(__('Invalid login or password.'));
546  }
547  if ($customer->getConfirmation() && $this->isConfirmationRequired($customer)) {
548  throw new EmailNotConfirmedException(__("This account isn't confirmed. Verify and try again."));
549  }
550 
551  $customerModel = $this->customerFactory->create()->updateData($customer);
552  $this->eventManager->dispatch(
553  'customer_customer_authenticated',
554  ['model' => $customerModel, 'password' => $password]
555  );
556 
557  $this->eventManager->dispatch('customer_data_object_login', ['customer' => $customer]);
558 
559  return $customer;
560  }
$customer
Definition: customers.php:11
__()
Definition: __.php:13

◆ canSkipConfirmation()

canSkipConfirmation (   $customer)
protected

Check whether confirmation may be skipped when registering using certain email address

Parameters
CustomerInterface$customer
Returns
bool
Deprecated:
101.0.4
See also
AccountConfirmation::isConfirmationRequired

Definition at line 1315 of file AccountManagement.php.

1316  {
1317  if (!$customer->getId()) {
1318  return false;
1319  }
1320 
1321  /* If an email was used to start the registration process and it is the same email as the one
1322  used to register, then this can skip confirmation.
1323  */
1324  $skipConfirmationIfEmail = $this->registry->registry("skip_confirmation_if_email");
1325  if (!$skipConfirmationIfEmail) {
1326  return false;
1327  }
1328 
1329  return strtolower($skipConfirmationIfEmail) === strtolower($customer->getEmail());
1330  }
$customer
Definition: customers.php:11

◆ changePassword()

changePassword (   $email,
  $currentPassword,
  $newPassword 
)

Change customer password.

Parameters
string$email
string$currentPassword
string$newPassword
Returns
bool true on success
Exceptions

Implements AccountManagementInterface.

Definition at line 947 of file AccountManagement.php.

948  {
949  try {
950  $customer = $this->customerRepository->get($email);
951  } catch (NoSuchEntityException $e) {
952  throw new InvalidEmailOrPasswordException(__('Invalid login or password.'));
953  }
954  return $this->changePasswordForCustomer($customer, $currentPassword, $newPassword);
955  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13
__()
Definition: __.php:13

◆ changePasswordById()

changePasswordById (   $customerId,
  $currentPassword,
  $newPassword 
)

Change customer password.

Parameters
int$customerId
string$currentPassword
string$newPassword
Returns
bool true on success
Exceptions

Implements AccountManagementInterface.

Definition at line 960 of file AccountManagement.php.

961  {
962  try {
963  $customer = $this->customerRepository->getById($customerId);
964  } catch (NoSuchEntityException $e) {
965  throw new InvalidEmailOrPasswordException(__('Invalid login or password.'));
966  }
967  return $this->changePasswordForCustomer($customer, $currentPassword, $newPassword);
968  }
$customer
Definition: customers.php:11
__()
Definition: __.php:13

◆ changeResetPasswordLinkToken()

changeResetPasswordLinkToken (   $customer,
  $passwordLinkToken 
)

Change reset password link token

Stores new reset password link token

Parameters
CustomerInterface$customer
string$passwordLinkToken
Returns
bool
Exceptions
InputException

Definition at line 1371 of file AccountManagement.php.

1372  {
1373  if (!is_string($passwordLinkToken) || empty($passwordLinkToken)) {
1374  throw new InputException(
1375  __(
1376  'Invalid value of "%value" provided for the %fieldName field.',
1377  ['value' => $passwordLinkToken, 'fieldName' => 'password reset token']
1378  )
1379  );
1380  }
1381  if (is_string($passwordLinkToken) && !empty($passwordLinkToken)) {
1382  $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
1383  $customerSecure->setRpToken($passwordLinkToken);
1384  $customerSecure->setRpTokenCreatedAt(
1385  $this->dateTimeFactory->create()->format(DateTime::DATETIME_PHP_FORMAT)
1386  );
1387  $this->customerRepository->save($customer);
1388  }
1389  return true;
1390  }
$customer
Definition: customers.php:11
__()
Definition: __.php:13

◆ checkPasswordStrength()

checkPasswordStrength (   $password)
protected

Make sure that password complies with minimum security requirements.

Parameters
string$password
Returns
void
Exceptions
InputException

Definition at line 698 of file AccountManagement.php.

699  {
700  $length = $this->stringHelper->strlen($password);
701  if ($length > self::MAX_PASSWORD_LENGTH) {
702  throw new InputException(
703  __(
704  'Please enter a password with at most %1 characters.',
705  self::MAX_PASSWORD_LENGTH
706  )
707  );
708  }
709  $configMinPasswordLength = $this->getMinPasswordLength();
710  if ($length < $configMinPasswordLength) {
711  throw new InputException(
712  __(
713  'The password needs at least %1 characters. Create a new password and try again.',
714  $configMinPasswordLength
715  )
716  );
717  }
718  if ($this->stringHelper->strlen(trim($password)) != $length) {
719  throw new InputException(
720  __("The password can't begin or end with a space. Verify the password and try again.")
721  );
722  }
723 
724  $requiredCharactersCheck = $this->makeRequiredCharactersCheck($password);
725  if ($requiredCharactersCheck !== 0) {
726  throw new InputException(
727  __(
728  'Minimum of different classes of characters in password is %1.' .
729  ' Classes of characters: Lower Case, Upper Case, Digits, Special Characters.',
730  $requiredCharactersCheck
731  )
732  );
733  }
734  }
__()
Definition: __.php:13

◆ createAccount()

createAccount ( CustomerInterface  $customer,
  $password = null,
  $redirectUrl = '' 
)

Definition at line 797 of file AccountManagement.php.

798  {
799  if ($password !== null) {
800  $this->checkPasswordStrength($password);
801  $customerEmail = $customer->getEmail();
802  try {
803  $this->credentialsValidator->checkPasswordDifferentFromEmail($customerEmail, $password);
804  } catch (InputException $e) {
805  throw new LocalizedException(
806  __("The password can't be the same as the email address. Create a new password and try again.")
807  );
808  }
809  $hash = $this->createPasswordHash($password);
810  } else {
811  $hash = null;
812  }
813  return $this->createAccountWithPasswordHash($customer, $hash, $redirectUrl);
814  }
$customer
Definition: customers.php:11
__()
Definition: __.php:13
createAccountWithPasswordHash(CustomerInterface $customer, $hash, $redirectUrl='')

◆ createAccountWithPasswordHash()

createAccountWithPasswordHash ( CustomerInterface  $customer,
  $hash,
  $redirectUrl = '' 
)

@SuppressWarnings(PHPMD.CyclomaticComplexity) @SuppressWarnings(PHPMD.NPathComplexity)

Definition at line 821 of file AccountManagement.php.

822  {
823  // This logic allows an existing customer to be added to a different store. No new account is created.
824  // The plan is to move this logic into a new method called something like 'registerAccountWithStore'
825  if ($customer->getId()) {
826  $customer = $this->customerRepository->get($customer->getEmail());
827  $websiteId = $customer->getWebsiteId();
828 
829  if ($this->isCustomerInStore($websiteId, $customer->getStoreId())) {
830  throw new InputException(__('This customer already exists in this store.'));
831  }
832  // Existing password hash will be used from secured customer data registry when saving customer
833  }
834 
835  // Make sure we have a storeId to associate this customer with.
836  if (!$customer->getStoreId()) {
837  if ($customer->getWebsiteId()) {
838  $storeId = $this->storeManager->getWebsite($customer->getWebsiteId())->getDefaultStore()->getId();
839  } else {
840  $this->storeManager->setCurrentStore(null);
841  $storeId = $this->storeManager->getStore()->getId();
842  }
843  $customer->setStoreId($storeId);
844  }
845 
846  // Associate website_id with customer
847  if (!$customer->getWebsiteId()) {
848  $websiteId = $this->storeManager->getStore($customer->getStoreId())->getWebsiteId();
849  $customer->setWebsiteId($websiteId);
850  }
851 
852  // Update 'created_in' value with actual store name
853  if ($customer->getId() === null) {
854  $websiteId = $customer->getWebsiteId();
855  if ($websiteId && !$this->isCustomerInStore($websiteId, $customer->getStoreId())) {
856  throw new LocalizedException(__('The store view is not in the associated website.'));
857  }
858 
859  $storeName = $this->storeManager->getStore($customer->getStoreId())->getName();
860  $customer->setCreatedIn($storeName);
861  }
862 
863  $customerAddresses = $customer->getAddresses() ?: [];
864  $customer->setAddresses(null);
865  try {
866  // If customer exists existing hash will be used by Repository
867  $customer = $this->customerRepository->save($customer, $hash);
868  } catch (AlreadyExistsException $e) {
869  throw new InputMismatchException(
870  __('A customer with the same email address already exists in an associated website.')
871  );
872  } catch (LocalizedException $e) {
873  throw $e;
874  }
875  try {
876  foreach ($customerAddresses as $address) {
877  if ($address->getId()) {
878  $newAddress = clone $address;
879  $newAddress->setId(null);
880  $newAddress->setCustomerId($customer->getId());
881  $this->addressRepository->save($newAddress);
882  } else {
883  $address->setCustomerId($customer->getId());
884  $this->addressRepository->save($address);
885  }
886  }
887  $this->customerRegistry->remove($customer->getId());
888  } catch (InputException $e) {
889  $this->customerRepository->delete($customer);
890  throw $e;
891  }
892  $customer = $this->customerRepository->getById($customer->getId());
893  $newLinkToken = $this->mathRandom->getUniqueHash();
894  $this->changeResetPasswordLinkToken($customer, $newLinkToken);
895  $this->sendEmailConfirmation($customer, $redirectUrl);
896 
897  return $customer;
898  }
sendEmailConfirmation(CustomerInterface $customer, $redirectUrl)
$customer
Definition: customers.php:11
__()
Definition: __.php:13
isCustomerInStore($customerWebsiteId, $storeId)
$address
Definition: customer.php:38
changeResetPasswordLinkToken($customer, $passwordLinkToken)
$storeName
Definition: logo.phtml:13

◆ createPasswordHash()

createPasswordHash (   $password)
protected

Create a hash for the given password

Parameters
string$password
Returns
string

Definition at line 1009 of file AccountManagement.php.

1010  {
1011  return $this->encryptor->getHash($password, true);
1012  }

◆ getAddressById()

getAddressById ( CustomerInterface  $customer,
  $addressId 
)
protected

Get address by id

Parameters
CustomerInterface$customer
int$addressId
Returns
AddressInterface|null

Definition at line 1453 of file AccountManagement.php.

1454  {
1455  foreach ($customer->getAddresses() as $address) {
1456  if ($address->getId() == $addressId) {
1457  return $address;
1458  }
1459  }
1460  return null;
1461  }
$customer
Definition: customers.php:11
$address
Definition: customer.php:38

◆ getConfirmationStatus()

getConfirmationStatus (   $customerId)

Gets the account confirmation status.

Parameters
int$customerId
Returns
string
Exceptions

Implements AccountManagementInterface.

Definition at line 781 of file AccountManagement.php.

782  {
783  // load customer by id
784  $customer = $this->customerRepository->getById($customerId);
785  if ($this->isConfirmationRequired($customer)) {
786  if (!$customer->getConfirmation()) {
788  }
790  }
792  }
$customer
Definition: customers.php:11

◆ getDefaultBillingAddress()

getDefaultBillingAddress (   $customerId)

Retrieve default billing address for the given customerId.

Parameters
int$customerId
Returns
\Magento\Customer\Api\Data\AddressInterface
Exceptions

Implements AccountManagementInterface.

Definition at line 903 of file AccountManagement.php.

904  {
905  $customer = $this->customerRepository->getById($customerId);
906  return $this->getAddressById($customer, $customer->getDefaultBilling());
907  }
$customer
Definition: customers.php:11
getAddressById(CustomerInterface $customer, $addressId)

◆ getDefaultShippingAddress()

getDefaultShippingAddress (   $customerId)

Retrieve default shipping address for the given customerId.

Parameters
int$customerId
Returns
\Magento\Customer\Api\Data\AddressInterface
Exceptions

Implements AccountManagementInterface.

Definition at line 912 of file AccountManagement.php.

913  {
914  $customer = $this->customerRepository->getById($customerId);
915  return $this->getAddressById($customer, $customer->getDefaultShipping());
916  }
$customer
Definition: customers.php:11
getAddressById(CustomerInterface $customer, $addressId)

◆ getFullCustomerObject()

getFullCustomerObject (   $customer)
protected

Create an object with data merged from Customer and CustomerSecure

Parameters
CustomerInterface$customer
Returns
Data\CustomerSecure
Deprecated:
100.1.0

Definition at line 1470 of file AccountManagement.php.

1471  {
1472  // No need to flatten the custom attributes or nested objects since the only usage is for email templates and
1473  // object passed for events
1474  $mergedCustomerData = $this->customerRegistry->retrieveSecureData($customer->getId());
1475  $customerData = $this->dataProcessor->buildOutputDataArray(
1476  $customer,
1477  \Magento\Customer\Api\Data\CustomerInterface::class
1478  );
1479  $mergedCustomerData->addData($customerData);
1480  $mergedCustomerData->setData('name', $this->customerViewHelper->getCustomerName($customer));
1481  return $mergedCustomerData;
1482  }
$customerData
$customer
Definition: customers.php:11

◆ getMinPasswordLength()

getMinPasswordLength ( )
protected

Retrieve minimum password length

Returns
int

Definition at line 773 of file AccountManagement.php.

774  {
775  return $this->scopeConfig->getValue(self::XML_PATH_MINIMUM_PASSWORD_LENGTH);
776  }

◆ getPasswordHash()

getPasswordHash (   $password)

Return hashed password, which can be directly saved to database.

Parameters
string$password
Returns
string

Implements AccountManagementInterface.

Definition at line 1490 of file AccountManagement.php.

1491  {
1492  return $this->encryptor->getHash($password);
1493  }

◆ getTemplateTypes()

getTemplateTypes ( )
protected

Get template types

Returns
array
Deprecated:
100.1.0

self::NEW_ACCOUNT_EMAIL_REGISTERED welcome email, when confirmation is disabled and password is set self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD welcome email, when confirmation is disabled and password is not set self::NEW_ACCOUNT_EMAIL_CONFIRMED welcome email, when confirmation is enabled and password is set self::NEW_ACCOUNT_EMAIL_CONFIRMATION email with confirmation link

Definition at line 1225 of file AccountManagement.php.

1226  {
1236  $types = [
1237  self::NEW_ACCOUNT_EMAIL_REGISTERED => self::XML_PATH_REGISTER_EMAIL_TEMPLATE,
1238  self::NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD => self::XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE,
1239  self::NEW_ACCOUNT_EMAIL_CONFIRMED => self::XML_PATH_CONFIRMED_EMAIL_TEMPLATE,
1240  self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
1241  ];
1242  return $types;
1243  }

◆ getWebsiteStoreId()

getWebsiteStoreId (   $customer,
  $defaultStoreId = null 
)
protected

Get either first store ID from a set website or the provided as default

Parameters
CustomerInterface$customer
int | string | null$defaultStoreId
Returns
int
Deprecated:
100.1.0
Exceptions
LocalizedException

Definition at line 1209 of file AccountManagement.php.

1210  {
1211  if ($customer->getWebsiteId() != 0 && empty($defaultStoreId)) {
1212  $storeIds = $this->storeManager->getWebsite($customer->getWebsiteId())->getStoreIds();
1213  reset($storeIds);
1214  $defaultStoreId = current($storeIds);
1215  }
1216  return $defaultStoreId;
1217  }
$customer
Definition: customers.php:11

◆ initiatePasswordReset()

initiatePasswordReset (   $email,
  $template,
  $websiteId = null 
)

Send an email to the customer with a password reset link.

Parameters
string$email
string$template
int$websiteId
Returns
bool true on success
Exceptions

Implements AccountManagementInterface.

Definition at line 574 of file AccountManagement.php.

575  {
576  if ($websiteId === null) {
577  $websiteId = $this->storeManager->getStore()->getWebsiteId();
578  }
579  // load customer by email
580  $customer = $this->customerRepository->get($email, $websiteId);
581 
582  $newPasswordToken = $this->mathRandom->getUniqueHash();
583  $this->changeResetPasswordLinkToken($customer, $newPasswordToken);
584 
585  try {
586  switch ($template) {
588  $this->getEmailNotification()->passwordReminder($customer);
589  break;
591  $this->getEmailNotification()->passwordResetConfirmation($customer);
592  break;
593  default:
594  $this->handleUnknownTemplate($template);
595  break;
596  }
597  return true;
598  } catch (MailException $e) {
599  // If we are not able to send a reset password email, this should be ignored
600  $this->logger->critical($e);
601  }
602  return false;
603  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13
changeResetPasswordLinkToken($customer, $passwordLinkToken)
$template
Definition: export.php:12

◆ isConfirmationRequired()

isConfirmationRequired (   $customer)
protected

Check if accounts confirmation is required in config

Parameters
CustomerInterface$customer
Returns
bool
Deprecated:
101.0.4
See also
AccountConfirmation::isConfirmationRequired

Definition at line 1298 of file AccountManagement.php.

1299  {
1300  return $this->accountConfirmation->isConfirmationRequired(
1301  $customer->getWebsiteId(),
1302  $customer->getId(),
1303  $customer->getEmail()
1304  );
1305  }
$customer
Definition: customers.php:11

◆ isCustomerInStore()

isCustomerInStore (   $customerWebsiteId,
  $storeId 
)

@inheritDoc

Implements AccountManagementInterface.

Definition at line 1071 of file AccountManagement.php.

1072  {
1073  $ids = [];
1074  if ((bool)$this->configShare->isWebsiteScope()) {
1075  $ids = $this->storeManager->getWebsite($customerWebsiteId)->getStoreIds();
1076  } else {
1077  foreach ($this->storeManager->getStores() as $store) {
1078  $ids[] = $store->getId();
1079  }
1080  }
1081 
1082  return in_array($storeId, $ids);
1083  }

◆ isEmailAvailable()

isEmailAvailable (   $customerEmail,
  $websiteId = null 
)

Check if given email is associated with a customer account in given website.

Parameters
string$customerEmail
int$websiteIdIf not set, will use the current websiteId
Returns
bool
Exceptions

Implements AccountManagementInterface.

Definition at line 1055 of file AccountManagement.php.

1056  {
1057  try {
1058  if ($websiteId === null) {
1059  $websiteId = $this->storeManager->getStore()->getWebsiteId();
1060  }
1061  $this->customerRepository->get($customerEmail, $websiteId);
1062  return false;
1063  } catch (NoSuchEntityException $e) {
1064  return true;
1065  }
1066  }

◆ isReadonly()

isReadonly (   $customerId)

Check if customer can be deleted.

Parameters
int$customerId
Returns
bool
Exceptions

Implements AccountManagementInterface.

Definition at line 1136 of file AccountManagement.php.

1137  {
1138  $customer = $this->customerRegistry->retrieveSecureData($customerId);
1139  return !$customer->getDeleteable();
1140  }
$customer
Definition: customers.php:11

◆ isResetPasswordLinkTokenExpired()

isResetPasswordLinkTokenExpired (   $rpToken,
  $rpTokenCreatedAt 
)

Check if rpToken is expired

Parameters
string$rpToken
string$rpTokenCreatedAt
Returns
bool

Definition at line 1339 of file AccountManagement.php.

1340  {
1341  if (empty($rpToken) || empty($rpTokenCreatedAt)) {
1342  return true;
1343  }
1344 
1345  $expirationPeriod = $this->customerModel->getResetPasswordLinkExpirationPeriod();
1346 
1347  $currentTimestamp = $this->dateTimeFactory->create()->getTimestamp();
1348  $tokenTimestamp = $this->dateTimeFactory->create($rpTokenCreatedAt)->getTimestamp();
1349  if ($tokenTimestamp > $currentTimestamp) {
1350  return true;
1351  }
1352 
1353  $hourDifference = floor(($currentTimestamp - $tokenTimestamp) / (60 * 60));
1354  if ($hourDifference >= $expirationPeriod) {
1355  return true;
1356  }
1357 
1358  return false;
1359  }

◆ makeRequiredCharactersCheck()

makeRequiredCharactersCheck (   $password)
protected

Check password for presence of required character sets

Parameters
string$password
Returns
int

Definition at line 742 of file AccountManagement.php.

743  {
744  $counter = 0;
745  $requiredNumber = $this->scopeConfig->getValue(self::XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER);
746  $return = 0;
747 
748  if (preg_match('/[0-9]+/', $password)) {
749  $counter++;
750  }
751  if (preg_match('/[A-Z]+/', $password)) {
752  $counter++;
753  }
754  if (preg_match('/[a-z]+/', $password)) {
755  $counter++;
756  }
757  if (preg_match('/[^a-zA-Z0-9]+/', $password)) {
758  $counter++;
759  }
760 
761  if ($counter < $requiredNumber) {
762  $return = $requiredNumber;
763  }
764 
765  return $return;
766  }

◆ resendConfirmation()

resendConfirmation (   $email,
  $websiteId = null,
  $redirectUrl = '' 
)

Resend confirmation email.

Parameters
string$email
int$websiteId
string$redirectUrl
Returns
bool true on success
Exceptions

Implements AccountManagementInterface.

Definition at line 458 of file AccountManagement.php.

459  {
460  $customer = $this->customerRepository->get($email, $websiteId);
461  if (!$customer->getConfirmation()) {
462  throw new InvalidTransitionException(__("Confirmation isn't needed."));
463  }
464 
465  try {
466  $this->getEmailNotification()->newAccount(
467  $customer,
468  self::NEW_ACCOUNT_EMAIL_CONFIRMATION,
469  $redirectUrl,
470  $this->storeManager->getStore()->getId()
471  );
472  } catch (MailException $e) {
473  // If we are not able to send a new account email, this should be ignored
474  $this->logger->critical($e);
475  }
476  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13
__()
Definition: __.php:13

◆ resetPassword()

resetPassword (   $email,
  $resetToken,
  $newPassword 
)

Reset customer password.

Parameters
string$emailIf empty value given then the customer will be matched by the RP token.
string$resetToken
string$newPassword
Returns
bool true on success
Exceptions

Implements AccountManagementInterface.

Definition at line 664 of file AccountManagement.php.

665  {
666  if (!$email) {
667  $customer = $this->matchCustomerByRpToken($resetToken);
668  $email = $customer->getEmail();
669  } else {
670  $customer = $this->customerRepository->get($email);
671  }
672  //Validate Token and new password strength
673  $this->validateResetPasswordToken($customer->getId(), $resetToken);
674  $this->credentialsValidator->checkPasswordDifferentFromEmail(
675  $email,
676  $newPassword
677  );
678  $this->checkPasswordStrength($newPassword);
679  //Update secure data
680  $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
681  $customerSecure->setRpToken(null);
682  $customerSecure->setRpTokenCreatedAt(null);
683  $customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
684  $this->sessionManager->destroy();
685  $this->destroyCustomerSessions($customer->getId());
686  $this->customerRepository->save($customer);
687 
688  return true;
689  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13

◆ sendEmailConfirmation()

sendEmailConfirmation ( CustomerInterface  $customer,
  $redirectUrl 
)
protected

Send either confirmation or welcome email after an account creation

Parameters
CustomerInterface$customer
string$redirectUrl
Returns
void

Definition at line 925 of file AccountManagement.php.

926  {
927  try {
928  $hash = $this->customerRegistry->retrieveSecureData($customer->getId())->getPasswordHash();
930  if ($this->isConfirmationRequired($customer) && $hash != '') {
932  } elseif ($hash == '') {
934  }
935  $this->getEmailNotification()->newAccount($customer, $templateType, $redirectUrl, $customer->getStoreId());
936  } catch (MailException $e) {
937  // If we are not able to send a new account email, this should be ignored
938  $this->logger->critical($e);
939  } catch (\UnexpectedValueException $e) {
940  $this->logger->error($e);
941  }
942  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$customer
Definition: customers.php:11
$templateType
Definition: list.phtml:37

◆ sendEmailTemplate()

sendEmailTemplate (   $customer,
  $template,
  $sender,
  $templateParams = [],
  $storeId = null,
  $email = null 
)
protected

Send corresponding email template

Parameters
CustomerInterface$customer
string$templateconfiguration path of email template
string$senderconfiguration path of email identity
array$templateParams
int | null$storeId
string$email
Returns
$this
Deprecated:
100.1.0

Definition at line 1257 of file AccountManagement.php.

1264  {
1265  $templateId = $this->scopeConfig->getValue(
1266  $template,
1267  ScopeInterface::SCOPE_STORE,
1268  $storeId
1269  );
1270  if ($email === null) {
1271  $email = $customer->getEmail();
1272  }
1273 
1274  $transport = $this->transportBuilder->setTemplateIdentifier($templateId)
1275  ->setTemplateOptions(['area' => Area::AREA_FRONTEND, 'store' => $storeId])
1276  ->setTemplateVars($templateParams)
1277  ->setFrom($this->scopeConfig->getValue(
1278  $sender,
1279  ScopeInterface::SCOPE_STORE,
1280  $storeId
1281  ))
1282  ->addTo($email, $this->customerViewHelper->getCustomerName($customer))
1283  ->getTransport();
1284 
1285  $transport->sendMessage();
1286 
1287  return $this;
1288  }
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13
$templateId
Definition: queue.php:15
$template
Definition: export.php:12

◆ sendNewAccountEmail()

sendNewAccountEmail (   $customer,
  $type = self::NEW_ACCOUNT_EMAIL_REGISTERED,
  $backUrl = '',
  $storeId = '0',
  $sendemailStoreId = null 
)
protected

Send email with new account related information

Parameters
CustomerInterface$customer
string$type
string$backUrl
string$storeId
string$sendemailStoreId
Returns
$this
Exceptions
LocalizedException
Deprecated:
100.1.0

Definition at line 1154 of file AccountManagement.php.

1160  {
1161  $types = $this->getTemplateTypes();
1162 
1163  if (!isset($types[$type])) {
1164  throw new LocalizedException(
1165  __('The transactional account email type is incorrect. Verify and try again.')
1166  );
1167  }
1168 
1169  if (!$storeId) {
1170  $storeId = $this->getWebsiteStoreId($customer, $sendemailStoreId);
1171  }
1172 
1173  $store = $this->storeManager->getStore($customer->getStoreId());
1174 
1175  $customerEmailData = $this->getFullCustomerObject($customer);
1176 
1177  $this->sendEmailTemplate(
1178  $customer,
1179  $types[$type],
1180  self::XML_PATH_REGISTER_EMAIL_IDENTITY,
1181  ['customer' => $customerEmailData, 'back_url' => $backUrl, 'store' => $store],
1182  $storeId
1183  );
1184 
1185  return $this;
1186  }
$customer
Definition: customers.php:11
__()
Definition: __.php:13
$type
Definition: item.phtml:13
sendEmailTemplate( $customer, $template, $sender, $templateParams=[], $storeId=null, $email=null)
getWebsiteStoreId($customer, $defaultStoreId=null)

◆ sendPasswordReminderEmail()

sendPasswordReminderEmail (   $customer)

Send email with new customer password

Parameters
CustomerInterface$customer
Returns
$this
Deprecated:
100.1.0

Definition at line 1399 of file AccountManagement.php.

1400  {
1401  $storeId = $this->storeManager->getStore()->getId();
1402  if (!$storeId) {
1404  }
1405 
1406  $customerEmailData = $this->getFullCustomerObject($customer);
1407 
1408  $this->sendEmailTemplate(
1409  $customer,
1410  self::XML_PATH_REMIND_EMAIL_TEMPLATE,
1411  self::XML_PATH_FORGOT_EMAIL_IDENTITY,
1412  ['customer' => $customerEmailData, 'store' => $this->storeManager->getStore($storeId)],
1413  $storeId
1414  );
1415 
1416  return $this;
1417  }
$customer
Definition: customers.php:11
sendEmailTemplate( $customer, $template, $sender, $templateParams=[], $storeId=null, $email=null)
getWebsiteStoreId($customer, $defaultStoreId=null)

◆ sendPasswordResetConfirmationEmail()

sendPasswordResetConfirmationEmail (   $customer)

Send email with reset password confirmation link

Parameters
CustomerInterface$customer
Returns
$this
Deprecated:
100.1.0

Definition at line 1426 of file AccountManagement.php.

1427  {
1428  $storeId = $this->storeManager->getStore()->getId();
1429  if (!$storeId) {
1431  }
1432 
1433  $customerEmailData = $this->getFullCustomerObject($customer);
1434 
1435  $this->sendEmailTemplate(
1436  $customer,
1437  self::XML_PATH_FORGOT_EMAIL_TEMPLATE,
1438  self::XML_PATH_FORGOT_EMAIL_IDENTITY,
1439  ['customer' => $customerEmailData, 'store' => $this->storeManager->getStore($storeId)],
1440  $storeId
1441  );
1442 
1443  return $this;
1444  }
$customer
Definition: customers.php:11
sendEmailTemplate( $customer, $template, $sender, $templateParams=[], $storeId=null, $email=null)
getWebsiteStoreId($customer, $defaultStoreId=null)

◆ sendPasswordResetNotificationEmail()

sendPasswordResetNotificationEmail (   $customer)
protected

Send email to customer when his password is reset

Parameters
CustomerInterface$customer
Returns
$this
Deprecated:
100.1.0

Definition at line 1195 of file AccountManagement.php.

1196  {
1198  }
$customer
Definition: customers.php:11

◆ validate()

validate ( CustomerInterface  $customer)

Definition at line 1030 of file AccountManagement.php.

1031  {
1032  $validationResults = $this->validationResultsDataFactory->create();
1033 
1034  $oldAddresses = $customer->getAddresses();
1035  $customerModel = $this->customerFactory->create()->updateData(
1036  $customer->setAddresses([])
1037  );
1038  $customer->setAddresses($oldAddresses);
1039 
1040  $result = $this->getEavValidator()->isValid($customerModel);
1041  if ($result === false && is_array($this->getEavValidator()->getMessages())) {
1042  return $validationResults->setIsValid(false)->setMessages(
1043  call_user_func_array(
1044  'array_merge',
1045  $this->getEavValidator()->getMessages()
1046  )
1047  );
1048  }
1049  return $validationResults->setIsValid(true)->setMessages([]);
1050  }
$customer
Definition: customers.php:11

◆ validateResetPasswordLinkToken()

validateResetPasswordLinkToken (   $customerId,
  $resetPasswordLinkToken 
)

Check if password reset token is valid.

Parameters
int$customerIdIf null is given then a customer will be matched by the RP token.
string$resetPasswordLinkToken
Returns
bool True if the token is valid
Exceptions

Implements AccountManagementInterface.

Definition at line 565 of file AccountManagement.php.

566  {
567  $this->validateResetPasswordToken($customerId, $resetPasswordLinkToken);
568  return true;
569  }

Field Documentation

◆ $authentication

$authentication
protected

Definition at line 304 of file AccountManagement.php.

◆ $customerModel

$customerModel
protected

Definition at line 299 of file AccountManagement.php.

◆ $customerViewHelper

$customerViewHelper
protected

Definition at line 279 of file AccountManagement.php.

◆ $dataProcessor

$dataProcessor
protected

Definition at line 269 of file AccountManagement.php.

◆ $dateTime

$dateTime
protected

Definition at line 284 of file AccountManagement.php.

◆ $extensibleDataObjectConverter

$extensibleDataObjectConverter
protected

Definition at line 294 of file AccountManagement.php.

◆ $logger

$logger
protected

Definition at line 214 of file AccountManagement.php.

◆ $objectFactory

$objectFactory
protected

Definition at line 289 of file AccountManagement.php.

◆ $registry

$registry
protected

Definition at line 274 of file AccountManagement.php.

◆ $stringHelper

$stringHelper
protected

Definition at line 234 of file AccountManagement.php.

◆ EMAIL_REMINDER

const EMAIL_REMINDER = 'email_reminder'

Constants for types of emails to send out. pdl: forgot, remind, reset email templates

Definition at line 147 of file AccountManagement.php.

◆ EMAIL_RESET

const EMAIL_RESET = 'email_reset'

Definition at line 149 of file AccountManagement.php.

◆ MIN_PASSWORD_LENGTH

const MIN_PASSWORD_LENGTH = 6
Deprecated:

Definition at line 169 of file AccountManagement.php.

◆ NEW_ACCOUNT_EMAIL_CONFIRMATION

const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation'

Welcome email, when confirmation is enabled

Deprecated:

Definition at line 133 of file AccountManagement.php.

◆ NEW_ACCOUNT_EMAIL_CONFIRMED

const NEW_ACCOUNT_EMAIL_CONFIRMED = 'confirmed'

Confirmation email, when account is confirmed

Deprecated:

Definition at line 140 of file AccountManagement.php.

◆ NEW_ACCOUNT_EMAIL_REGISTERED

const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered'

Constants for the type of new account email to be sent

Deprecated:

Definition at line 119 of file AccountManagement.php.

◆ NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD

const NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD = 'registered_no_password'

Welcome email, when password setting is required

Deprecated:

Definition at line 126 of file AccountManagement.php.

◆ XML_PATH_CONFIRM_EMAIL_TEMPLATE

const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template'
Deprecated:

Definition at line 107 of file AccountManagement.php.

◆ XML_PATH_CONFIRMED_EMAIL_TEMPLATE

const XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template'
Deprecated:

Definition at line 112 of file AccountManagement.php.

◆ XML_PATH_FORGOT_EMAIL_IDENTITY

const XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity'
Deprecated:

Definition at line 96 of file AccountManagement.php.

◆ XML_PATH_FORGOT_EMAIL_TEMPLATE

const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template'
Deprecated:

Definition at line 91 of file AccountManagement.php.

◆ XML_PATH_IS_CONFIRM

const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'

◆ XML_PATH_MINIMUM_PASSWORD_LENGTH

const XML_PATH_MINIMUM_PASSWORD_LENGTH = 'customer/password/minimum_password_length'

Configuration path to customer password minimum length

Definition at line 154 of file AccountManagement.php.

◆ XML_PATH_REGISTER_EMAIL_IDENTITY

const XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity'
Deprecated:

Definition at line 81 of file AccountManagement.php.

◆ XML_PATH_REGISTER_EMAIL_TEMPLATE

const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template'

Configuration paths for email templates and identities

Deprecated:

Definition at line 71 of file AccountManagement.php.

◆ XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE

const XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE = 'customer/create_account/email_no_password_template'
Deprecated:

Definition at line 76 of file AccountManagement.php.

◆ XML_PATH_REMIND_EMAIL_TEMPLATE

const XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template'
Deprecated:

Definition at line 86 of file AccountManagement.php.

◆ XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER

const XML_PATH_REQUIRED_CHARACTER_CLASSES_NUMBER = 'customer/password/required_character_classes_number'

Configuration path to customer password required character classes number

Definition at line 159 of file AccountManagement.php.

◆ XML_PATH_RESET_PASSWORD_TEMPLATE

const XML_PATH_RESET_PASSWORD_TEMPLATE = 'customer/password/reset_password_template'
Deprecated:

Definition at line 164 of file AccountManagement.php.


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