I am using cakephp auth Plugin . After login what happening is . The default log-in page is set by defining the loginAction variable in the beforeFilter function in your UsersController or AppController. But if you have used plug-ins in your application, and if a user tries to access a controller action of a plug-in the user is redirected to an invalid page like this.
http://satyam.vakharia.com/plugin_name/users/login
BeforeFilter functionality is like 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');
}
$this->Auth->loginAction = array('plugin' => false, 'controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('plugin' => false, 'controller' => 'home', 'action' => 'index');
$this->Auth->loginError = 'Invalid Username or Password.';
$this->Auth->authError = "You are not authorized to access.";
$this->Auth->logoutRedirect = array('plugin' => false, 'controller' => 'users', 'action' => 'login');
There.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With