I have something that I thought was a relatively common problem, but after researching the issue, it appears not to be as easy as thought.
I have a CakePHP application (using version 1.2.7) and I am trying to change the standard login procedure using the Auth Component. I would like to use a persistent login screen ( like this Jquery plugin : http://web-kreation.com/demos/Sliding_login_panel_jquery/ ) which my users would use to login.
In Cake terminology, I would like to be able to login to the Auth component from the /pages/home screen but Cakephp keeps redirecting to the /users/login.
In My App Controller :
function beforeFilter()
{
...
$this->Auth->loginAction = array( 'controller' => 'users', 'action' => 'login' );
$this->Auth->loginRedirect = array( 'controller' => 'pages', 'action' => 'home' );
$this->Auth->logoutRedirect = array( 'controller' => 'pages', 'action' => 'home' );
$this->Auth->autoRedirect = false;
...
}
If I change the loginAction to /pages/home. the login does not work, in fact it does not even post to the /users/login method. Not exactly sure what has happened.
My question is this :
How do I make a login form located at www.EXAMPLE.com/ which will return to the same location on successful and unsuccessful login?
I would prefer not to have it redirect to /users/login or have that show up in the URL at all.