I don't think it's necessary to figure this out because of the feature of password input.Also it would be difficult to do this since you've used the Auth
component.From the cookbook:
The auth component will automatically hash the password field if the username field is also present in the submitted data
That means you will lost the original password data after your submit it.However,I think there's a tricky way to approach that with javascript:adding a hidden type input in the register view file which is the same value but different name with $form->input('password');
,then you can retrieve it in the action to display in the password input text.e.g
if ($this->data['User']['password'] == $this->Auth->password($this->data['User']['password_confirm']))
{
$this->User->save($this->data);
$this->Session->setFlash("your data has been saved.");
$this->redirect("index");
}
else
{
$this->data['User']['password'] = $this->data['User']['trickpassword'];
/*i prefer this
$this->data['User']['password'] = '';
$this->data['User']['password_confirm'] = '';
*/
$this->Session->setFlash('Password confirm fail!');
}