Use a different Model for Auth Component



I want to use another table to login but I can’t make it work. I have an ‘usuarios’ table with ‘email’ and ‘senha’ fields. Inside my AppController I tried to add this but it didnt work out.

‘authenticate’ => ‘Form’ => [‘userModel’ => ‘Usuario’, ‘fields’ => [‘username’ => ‘email’, ‘password’ => ‘senha’]]];

What should I do?


userModel should be Usuarios if you have a Table class class UsuariosTable extends Table?