Problem I need to authenticate by email or username

Hello everyone

problem authentication with username or email

  • I tried to add in the array an array [‘username’, ‘email’] as we do with the auth component but it doesn’t work.
$fields = [
            IdentifierInterface::CREDENTIAL_USERNAME => ['username', 'email'],
            IdentifierInterface::CREDENTIAL_PASSWORD => 'password'
  • I also need to add a scope for active users

thanks for help

You can learn with this plugin: GitHub - CakeDC/users: Users Plugin for CakePHP or/and use it…

I reselove thé problem by adding custom Finder in resolver