I have an application that need a session refresh every 5 minutes. I have the sessionRefreshAction in Auth Controller. How I can call it through Module.php of Application. I was thinking with forward()->dispatch() but I don't know how to do. Thanks
Asked
Active
Viewed 61 times
2 Answers
0
You should probably create a class that you instantiate in both your controller and your Module.php that performs the common functionality.

STLMikey
- 1,210
- 7
- 19
0
Check here this will solve your problem
// Redirect to the user login page, as an example
$router = $e->getRouter();
$url = $router->assemble(array(), array(
'name' => 'zfcuser/sessionrefresh'
));
$response = $e->getResponse();
$response->getHeaders()->addHeaderLine('Location', $url);
$response->setStatusCode(302);
return $response;

Community
- 1
- 1

Harish Singh
- 3,359
- 5
- 24
- 39