email login
Closed this issue · 1 comments
rrd108 commented
In src/Application.php
at the end of the bootstrap()
function I have added the code example form the docs.
$this->addPlugin(\CakeDC\Users\Plugin::class);
$identifiers = Configure::read('Auth.Identifiers');
$identifiers['Authentication.Password']['fields']['username'] = 'email';
Configure::write('Auth.Identifiers', $identifiers);
Everything else is left as it comes with the normal install.
I et this error message: "Property Authentication.Password.className should be defined"
It seems Configure::read('Auth')
is completely empty when I try to read it to $identifiers
rrd108 commented
adding this to config/users.php
solves the problem
return [
'Users' => [
'Auth.Identifiers.Password.fields.username' => 'email'
]
];