My loginAction is in a module user, in the controller application/modules/user/controllers/AuthController.php. I want to redirect upon successful login to the indexAction in application/controllers/IndexController.php. So I have this:
if ($result->isValid()) {
$auth->getStorage()->write($adapter->getResultRowObject());
$this->_helper->redirector('index', 'index');
return;
}
When I now login, I get the message Message: Invalid controller specified (index). I guess it is because my login is in the module user, while the IndexController is in the root application.
How can I fix this?
The redirector() action helper has several methods to redirect the request.
try this, the controllers at application/controllers are in the ‘default’ module:
The way I prefer to use this helper is more explicit, so I don’t have to remember the defaults:
and the quick and dirty utility method:
Hope this helps