• I am doing login and logout to magento backend via API.
  • I am enable to create the session and pass to API response to my UI part. But when I log out from UI , the API should destroy that backend session How can I achieve this?

I am trying to do with below code.

$adminSession = Mage::getSingleton('admin/session');

any one can help quickly will force my progress Thanks.

2 Answers 2


Try using

$adminSession = Mage::getSingleton('adminhtml/session');
  • Thanks but not gettting success Oct 3, 2018 at 14:07

If you want to Unset session values, try this.. It will help you.

$adminSession = Mage::getSingleton('adminhtml/session');
$adminSession->unsetData('day_filter'); // use session name instead of 'day_filter'
  • Thanks but not getting success Oct 3, 2018 at 14:07
  • I set session file name : "sess_vqvn8a24445npbsrjtgd67qtm2" at place of 'days_filter' and execute the code but the file is not get deleted. Oct 3, 2018 at 14:08

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.