I am using the cakephp auth plugin. After logging in, what happens. The default login page is set by defining the loginAction variable in the beforeFilter function in your UserController or AppController. But if you use plugins in your application, and if the user tries to access the action of the plug-in controller, the user is redirected to an invalid page like this.
http://satyam.vakharia.com/plugin_name/users/login
BeforeFilter functionality is similar to this.
function beforeFilter() { Security::setHash('md5'); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'home', 'action' => 'index'); $this->Auth->loginError = 'Invalid Username or Password.'; $this->Auth->authError = "You are not authorized to access."; $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
}
source share