-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Description
Hi, all,
I got a problem when I Initialize the AccountManagementInterface
with my own class. I have created my own AccountManagement
which is extended from \Magento\Customer\Model\AccountManagement
.
namespace AiMai\MyModule\Model;
class AccountManagement extends \Magento\Customer\Model\AccountManagement implements AccountManagementInterface
{
...
}
I defined following statement in di.xml
file:
\<preference for="Magento\Customer\Api\AccountManagementInterface"
type="AiMai\MyModule\Model\AccountManagement" />
But when I run the software, it still initialize the Magento\Customer\Model\AccountManagement
class in the following code.
class ForgotPasswordPost extends \Magento\Customer\Controller\Account\ForgotPasswordPost
{
public function __construct(Context $context, Session $customerSession, AccountManagementInterface $customerAccountManagement, Escaper $escaper)
{
parent::__construct($context, $customerSession, $customerAccountManagement, $escaper);
}
...}
Thanks
- David
Metadata
Metadata
Assignees
Labels
No labels