I have developed a custom module with the help from @Marius, that allows a customer support team member to select a customer from the customer list in the admin section and logs them in as the customer and then redirects to shop.

I now need to the opposite, from a custom page in the client side I need to:

  1. Clear the customer session
  2. Redirect back to the customer list in the admin section.

This is the code I have in a new controller:

 // get customer list in admin section URL
 $customerUrl = Mage::helper('adminhtml')->getUrl('adminhtml/customer/index');
 // Logout customer session 
 // Redirect to customers page in admin section

This code kind works but I get redirect to the admin dashboard.

Please can you point me in the direction

Many thanks


1 Answer 1


I think the following snippet should do what you need here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.