I am working on a authentication class with Zend Framework. I added a predispatch function in Zend_Controller_Plugin_Abstract to check the user login status.
public function preDispatch(Zend_Controller_Request_Abstract $request) {
if (!$logined){
$request->setControllerName('auth')->setActionName('login');
}
}
if user is not logined they do get diverted to the login page, however the url still shown the other url that user clicked.I want to handle everything in this predispatch plugin rather than doing redirect in every other actions/controlls pages. Any solution?
Thank you.