I’ve extended the Mage_Adminhtml_CustomerController with a new action loginAction in order to be able to login as a customer from the admin interface.
I call the loginById on the customer/session, but the customer’s session isn’t modified after the redirect.
Can someone explain why? It should be a simple operation.
Here’s a gist containing the loginAction
I appreciate any help.
Thanks!
Update:
I created a github-repo containing all the code for the module: https://github.com/KATT/Magento-CustomerLogin.
Once this issue is solved, it might be useful for someone else as well.
Hi I created a way to login as a customer. With the following solution below you can get an action in the customer grid management view in backend for each customer:
You have to create a controller for the frontend and do a class rewrite of an admin block, please adapt to your situation and don’t forget to create a xml file which activate your module at app/etc/modules/Yourmodule_Customer.xml
Here is the config.xml of a module that you will have to create:
Then you have to create a block class in the folder Youmodule/Customer/Block/Adminhtml/Overwrite/Grid.php with the following content:
Be aware that if you have Store Code in URL activated, you need here to provide a default store code.
Then you have to create a new frontend controller, in this case, it’s restricted to authorized IP address defined in the backend configuration: