Skip to content

Files

Latest commit

 

History

History
1437 lines (1290 loc) · 47.5 KB

AccountManagement.php

File metadata and controls

1437 lines (1290 loc) · 47.5 KB
 
Nov 10, 2014
Nov 10, 2014
1
2
<?php
/**
Feb 22, 2017
Feb 22, 2017
3
* Copyright © Magento, Inc. All rights reserved.
Jan 9, 2015
Jan 9, 2015
4
* See COPYING.txt for license details.
Nov 10, 2014
Nov 10, 2014
5
6
7
8
9
*/
namespace Magento\Customer\Model;
use Magento\Customer\Api\AccountManagementInterface;
use Magento\Customer\Api\AddressRepositoryInterface;
Dec 12, 2014
Dec 12, 2014
10
use Magento\Customer\Api\CustomerMetadataInterface;
Nov 10, 2014
Nov 10, 2014
11
use Magento\Customer\Api\CustomerRepositoryInterface;
Dec 12, 2014
Dec 12, 2014
12
use Magento\Customer\Api\Data\AddressInterface;
Nov 10, 2014
Nov 10, 2014
13
use Magento\Customer\Api\Data\CustomerInterface;
Jul 10, 2015
Jul 10, 2015
14
use Magento\Customer\Api\Data\ValidationResultsInterfaceFactory;
Nov 28, 2014
Nov 28, 2014
15
use Magento\Customer\Helper\View as CustomerViewHelper;
Nov 10, 2014
Nov 10, 2014
16
17
use Magento\Customer\Model\Config\Share as ConfigShare;
use Magento\Customer\Model\Customer as CustomerModel;
Oct 27, 2017
Oct 27, 2017
18
use Magento\Customer\Model\Customer\CredentialsValidator;
Nov 10, 2014
Nov 10, 2014
19
use Magento\Customer\Model\Metadata\Validator;
Apr 26, 2016
Apr 26, 2016
20
use Magento\Eav\Model\Validator\Attribute\Backend;
Jul 10, 2015
Jul 10, 2015
21
use Magento\Framework\Api\ExtensibleDataObjectConverter;
Jul 16, 2015
Jul 16, 2015
22
use Magento\Framework\App\Area;
Nov 10, 2014
Nov 10, 2014
23
use Magento\Framework\App\Config\ScopeConfigInterface;
Apr 26, 2016
Apr 26, 2016
24
use Magento\Framework\App\ObjectManager;
Oct 27, 2017
Oct 27, 2017
25
use Magento\Framework\DataObjectFactory as ObjectFactory;
Nov 10, 2014
Nov 10, 2014
26
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
Jul 31, 2015
Jul 31, 2015
27
use Magento\Framework\Encryption\Helper\Security;
Nov 10, 2014
Nov 10, 2014
28
use Magento\Framework\Event\ManagerInterface;
Feb 12, 2015
Feb 12, 2015
29
use Magento\Framework\Exception\AlreadyExistsException;
Nov 10, 2014
Nov 10, 2014
30
31
32
use Magento\Framework\Exception\EmailNotConfirmedException;
use Magento\Framework\Exception\InputException;
use Magento\Framework\Exception\InvalidEmailOrPasswordException;
Feb 12, 2015
Feb 12, 2015
33
use Magento\Framework\Exception\LocalizedException;
Oct 27, 2017
Oct 27, 2017
34
use Magento\Framework\Exception\MailException;
Nov 10, 2014
Nov 10, 2014
35
36
37
38
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\State\ExpiredException;
use Magento\Framework\Exception\State\InputMismatchException;
use Magento\Framework\Exception\State\InvalidTransitionException;
Mar 19, 2016
Mar 19, 2016
39
use Magento\Framework\Exception\State\UserLockedException;
Oct 27, 2017
Oct 27, 2017
40
use Magento\Framework\Intl\DateTimeFactory;
Nov 10, 2014
Nov 10, 2014
41
42
use Magento\Framework\Mail\Template\TransportBuilder;
use Magento\Framework\Math\Random;
Dec 12, 2014
Dec 12, 2014
43
use Magento\Framework\Reflection\DataObjectProcessor;
Oct 27, 2017
Oct 27, 2017
44
use Magento\Framework\Registry;
Nov 10, 2014
Nov 10, 2014
45
use Magento\Framework\Stdlib\DateTime;
Feb 17, 2016
Feb 17, 2016
46
use Magento\Framework\Stdlib\StringUtils as StringHelper;
Oct 27, 2017
Oct 27, 2017
47
use Magento\Store\Model\ScopeInterface;
Feb 3, 2015
Feb 3, 2015
48
use Magento\Store\Model\StoreManagerInterface;
Oct 27, 2017
Oct 27, 2017
49
use Psr\Log\LoggerInterface as PsrLogger;
Feb 19, 2018
Feb 19, 2018
50
51
52
use Magento\Framework\Session\SessionManagerInterface;
use Magento\Framework\Session\SaveHandlerInterface;
use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory;
Nov 10, 2014
Nov 10, 2014
53
54
55
56
57
58
59
60
61
62
63
64
/**
* Handle various customer account actions
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
class AccountManagement implements AccountManagementInterface
{
/**
* Configuration paths for email templates and identities
Mar 19, 2016
Mar 19, 2016
65
66
*
* @deprecated
Nov 10, 2014
Nov 10, 2014
67
68
69
*/
const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template';
Mar 19, 2016
Mar 19, 2016
70
71
72
/**
* @deprecated
*/
Aug 19, 2015
Aug 19, 2015
73
74
const XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE = 'customer/create_account/email_no_password_template';
Mar 19, 2016
Mar 19, 2016
75
76
77
/**
* @deprecated
*/
Nov 10, 2014
Nov 10, 2014
78
79
const XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity';
Mar 19, 2016
Mar 19, 2016
80
81
82
/**
* @deprecated
*/
Nov 10, 2014
Nov 10, 2014
83
84
const XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template';
Mar 19, 2016
Mar 19, 2016
85
86
87
/**
* @deprecated
*/
Nov 10, 2014
Nov 10, 2014
88
89
const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template';
Mar 19, 2016
Mar 19, 2016
90
91
92
/**
* @deprecated
*/
Nov 10, 2014
Nov 10, 2014
93
94
const XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity';
Dec 5, 2017
Dec 5, 2017
95
96
97
98
/**
* @deprecated
* @see AccountConfirmation::XML_PATH_IS_CONFIRM
*/
Nov 10, 2014
Nov 10, 2014
99
100
const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm';
Mar 19, 2016
Mar 19, 2016
101
/**