Okies this question is similar to one I have asked recently on Stack Overflow, but I\'m basically just using the code from the CakePHP Book rather than my own code to try and un
Though id added it in UsersController (not in AppController), but this worked for me for email as username:
public $components = array('Auth');
//beforeFilter in UsersController
function beforeFilter() {
parent::beforeFilter();
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->authenticate = array(
'Form' => array(
'fields' => array('username' => 'email')
)
);
}
Hope it helps in some way