Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AccountManagementInterface.php
Go to the documentation of this file.
1 <?php
8 namespace Magento\Customer\Api;
9 
11 
18 {
22  const ACCOUNT_CONFIRMED = 'account_confirmed';
23  const ACCOUNT_CONFIRMATION_REQUIRED = 'account_confirmation_required';
24  const ACCOUNT_CONFIRMATION_NOT_REQUIRED = 'account_confirmation_not_required';
25  const MAX_PASSWORD_LENGTH = 256;
37  public function createAccount(
38  \Magento\Customer\Api\Data\CustomerInterface $customer,
39  $password = null,
40  $redirectUrl = ''
41  );
42 
56  public function createAccountWithPasswordHash(
57  \Magento\Customer\Api\Data\CustomerInterface $customer,
58  $hash,
59  $redirectUrl = ''
60  );
61 
69  public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer);
70 
80  public function isReadonly($customerId);
81 
90  public function activate($email, $confirmationKey);
91 
101  public function activateById($customerId, $confirmationKey);
102 
111  public function authenticate($email, $password);
112 
122  public function changePassword($email, $currentPassword, $newPassword);
123 
133  public function changePasswordById($customerId, $currentPassword, $newPassword);
134 
144  public function initiatePasswordReset($email, $template, $websiteId = null);
145 
158  public function resetPassword($email, $resetToken, $newPassword);
159 
174  public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken);
175 
183  public function getConfirmationStatus($customerId);
184 
194  public function resendConfirmation($email, $websiteId, $redirectUrl = '');
195 
204  public function isEmailAvailable($customerEmail, $websiteId = null);
205 
214  public function isCustomerInStore($customerWebsiteId, $storeId);
215 
224  public function getDefaultBillingAddress($customerId);
225 
234  public function getDefaultShippingAddress($customerId);
235 
242  public function getPasswordHash($password);
243 }
isEmailAvailable($customerEmail, $websiteId=null)
initiatePasswordReset($email, $template, $websiteId=null)
validate(\Magento\Customer\Api\Data\CustomerInterface $customer)
$customer
Definition: customers.php:11
$email
Definition: details.phtml:13
changePasswordById($customerId, $currentPassword, $newPassword)
validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken)
resetPassword($email, $resetToken, $newPassword)
activateById($customerId, $confirmationKey)
changePassword($email, $currentPassword, $newPassword)
resendConfirmation($email, $websiteId, $redirectUrl='')
createAccount(\Magento\Customer\Api\Data\CustomerInterface $customer, $password=null, $redirectUrl='')
createAccountWithPasswordHash(\Magento\Customer\Api\Data\CustomerInterface $customer, $hash, $redirectUrl='')
isCustomerInStore($customerWebsiteId, $storeId)
$template
Definition: export.php:12