Hello i have a website where if the login session times out i save the request like this
Abc::saveThisUrl($this->getRequest());
public static function saveThisUrl($url) {
$lastPg = new Zend_Session_Namespace('history');
$lastPg->url = $url;
}
then after successful login i want to execute it
public static function getSavedUrl() {
$lastPg = new Zend_Session_Namespace('history');
if(!empty($lastPg->url)) {
$path = $lastPg->url;
$lastPg->unsetAll();
return $path;
}
return ''; // Go back to index/index by default;
}
so in my AbcController.php
public loginAction()
{
...//login succesfull
//i tried
$request = Abc::getSavedUrl(); /* @var $request Zend_Controller_Request_Abstract */
$this->setRequest($request);
$this->dispatch($request);
//or
$this->run($request->getRequestUri());
//also tried
$front = Zend_Controller_Front::getInstance();
$front->setRequest($request);
return $front->dispatch($request);
}
both didn’t work. I need to be able to execute POST queries too, many solutions on internet only care about URL
i found out how
and then this