Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize the AccountManagementInterface with my own class problem #3627

Closed
cs221313 opened this issue Mar 3, 2016 · 3 comments
Closed
Assignees

Comments

@cs221313
Copy link

cs221313 commented Mar 3, 2016

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
@slavvka
Copy link
Member

slavvka commented Apr 14, 2016

Hi, have you cleared the cache?

@cs221313
Copy link
Author

It's long time ago. I think I have solved this problem. But I can not remember how I solved it.

@slavvka slavvka closed this as completed May 18, 2016
@slavvka
Copy link
Member

slavvka commented May 18, 2016

Okay, thank you, feel free to reopen it if it occurs again.

magento-engcom-team pushed a commit that referenced this issue Jan 24, 2019
[EngCom] Public Pull Requests - GraphQL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants