I am testing a migration from 1.3 to 2.0 for an Intranet site. After logging on an existing user, print_r($this->Auth->user()); returns the following:
Array
(
[username] => keith
[password] => f793ff5af0ea72013679a4635f40fbfaa5808895
)
Theuser is defined in the Users table, so I would have expected to see all of the fields which are defined in the Users table, which is the behaviour under 1.3.
In 2.0
$this->Auth->login($this->request->data)will log the user in with whatever data is posted, whereas in 1.3$this->Auth->login($this->data)would try to identify the user first and only log in when successful.http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
I’m guessing you passed data to your
$this->Auth->login()method.$this->Auth->login()will authenticate and login with the form data POSTed without passing the data in (which will log in the user no matter what).