I have just implemented login functionality similar to this tutorial http://symfony.com/doc/current/cookbook/security/entity_provider.html , but when I try to log in, I get:
"There is no user provider for user "App\SomeBundle\Entity\User""
My repository implements required interface, user entity references to the repository and in security.yml I have defined provider like in example for custom entity provider. I'm lost why there is an error.
In security.yml I have:
security:
encoders:
\App\SomeBundle\Entity\User: sha512
Symfony\Component\Security\Core\User\User: plaintext
role_hierarchy:
...
providers:
main:
entity: { class: AppSomeBundle:User }
...
Header of user entity:
/**
* App\SomeBundle\Entity\User
*
* @ORM\Table(
* name="user",
* uniqueConstraints={
* @ORM\UniqueConstraint(name="email_unique", columns={"user_email"})
* }
* )
* @ORM\Entity(repositoryClass="App\SomeBundle\EntityRepository\UserRepository")
*/
class User implements UserInterface, EquatableInterface, \Serializable
{
And header of repository:
class UserRepository extends EntityRepository implements UserProviderInterface
{
Thanks for help.