0
votes

I am using the auth component but I don't want to use a username I want to use the users email address instead. So i've renamed my username field to username and then in my controller put the following:

$this->Auth->fields = array(
    'username' => 'email',
    'password' => 'password'
);

I also renamed my input in the login form from username to email like so:

echo $session->flash('auth');
echo $form->create('User', array('action' => 'login'));
echo $form->input('email');
echo $form->input('password');
echo $form->end('Login');

The form now does not work it just keeps sayin the username or password is incorrect.

1

1 Answers

0
votes

Oh it seems to have suddenly started working now! never mind!