After updating framework to 4 version, I want to migrate from AuthComponent
to AuthenticationCompoent
. But I have a problem with model name. How I can set custom user model for AuthenticationCompoent
, I’ve tried the following, but it is not work:
Application.php
$authenticationService->loadAuthenticator('Authentication.Form', [
'fields' => [
'username' => 'login',
'password' => 'password',
],
'loginUrl' => Router::url('managers/login'),
'userModel' => 'Managers'
]);