in appcontroller
public function beforeFilter( )
{
$this->Auth->autoRedirect = false;
}
in usercontroller
public function login( )
{
if( $this->Auth->user( ) )
{
$this->redirect( array(
'controller' => 'users' ,
'action' => 'index' ,
));
}
}
In addition, if you have not done so already, you must transfer the form to the element so that you can absolutely make sure that the login form is identical between the two input types.
Abba bryant
source
share