Can i redirect from observer in Magento?
admin_session_user_login_success
Here I am checking session and if the session is already created then redirect to same page otherwise redirect to home page
If yes then how? Please suggest code
Can i redirect from observer in Magento?
admin_session_user_login_success
Here I am checking session and if the session is already created then redirect to same page otherwise redirect to home page
If yes then how? Please suggest code
try something like this:
$controller = Mage::app()->getRequest()->getControllerAction();
$controller->getRequest()->setDispatched(true);
$controller->getResponse()->setRedirect(Mage::app()->getRequest()>getServer('HTTP_REFERER'));
$controller->getResponse()->sendResponse();
Good luck! May the force be with you.