When I enter username and password on a login form, it doesn’t redirect to the $loginRedirect path and show the login form again with the password field filled with the hashed password in the database for that username!
I use thew Auth component and the sign_me_up plugin.
This is file login.ctp:
<?php
if($session->check('Message.Auth'))
$session->flash();
echo $form->create('User',array('action'=>'/login'));
echo $form->input('username');
echo $form->input('password');
echo $form->end('login');
?>
and this is beforeFilter()
function beforeFilter(){
$this->Auth->loginRedirect = array('controller' => 'posts', 'action' => 'index');
}
The login problem is just for / in action.
It is usually good to empty password field for every failed submission attempt, you can do so by
echo $form->input('password', array('value' => false));I asked a similar question (to my answer) a while back:
CakePHP: Clearing password field on failed submission