cancel
Showing results for 
Search instead for 
Did you mean: 

Magento double log out. Have to log out twice

SOLVED

Magento double log out. Have to log out twice

Hi guys

 

I'm getting this really weird issue where customer accounts need to hit log out twice to actually log out.

 

First, you click the link the top links and this will take you to page saying you've succesfully logged out. But then it will show this:

 

Only by clicking "Not [name]?" will it finally log a customer out.

 

I want logout with a one simple click.

 

Any ideas what's up with this? I couldn't google anything similar. Perhaps it's a theme setting?

 

Thanks in advance

Mark

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento double log out. Have to log out twice

I created an observer on the customer_logout event and ran this function:

 

		$customerSession = Mage::getSingleton('customer/session');
        $customerSession
            ->setCustomerId(null)
            ->setCustomerGroupId(null);
        Mage::helper('persistent/session')->getSession()->removePersistentCookie();

View solution in original post

1 REPLY 1

Re: Magento double log out. Have to log out twice

I created an observer on the customer_logout event and ran this function:

 

		$customerSession = Mage::getSingleton('customer/session');
        $customerSession
            ->setCustomerId(null)
            ->setCustomerGroupId(null);
        Mage::helper('persistent/session')->getSession()->removePersistentCookie();