I need to pass customer information to WordPress before s/he logout from Magento Automatically before session expired.

Which Observer event I need to use to resolved this issue?

1 Answer 1


There is the event customer_logout. It is dispatched in Mage_Customer_Model_Session::logout() that is called in Mage_Customer_AccountController::logoutAction().
You receive as parameter for the observer the customer instance.

You can build the observer like this:

public function customerLogout($observer) 
    $customer = $observer->getEvent()->getCustomer();
    $customerEmail = $customer->getEmail(); //or any other property
    //do something with $customer or $customerEmail or anything else

[EDIT after the question was edited]
I don't think there is an event thatis fired when the session is expired.
A session can expire for different reasons that don't necessarily depend on the system, like deleting the session cookie or the session file from var/sessions. You cannot track those.

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.