In my view I have:
Form->create(\'User\', array(\"controller\" => \"Users\", \"action\" => \"login\", \"method\" => \"pos
I believe the problem is:
function beforeFilter(){
$this->Auth->fields = array(
'username' => 'email',
'password' => 'password'
);
}
That was how custom login fields were specified in CakePHP 1.3. CakePHP 2.0 instead requires you to specify these fields in the public $components = array(...);
. The 1.3 API shows that Auth has a $fields property, but the 2.0 API shows that there is no longer a $fields property. So you must:
public $components = array(
'Session',
'Auth' => array(
'authenticate' => array(
'Form' => array(
'fields' => array('username' => 'email')
)
)
)
);
More information can be found at: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers
Please tell me how it works out!