I'm trying to build a login system that checks my database User entity in order to authenticate.
My security.yaml:
providers:
db_web:
entity:
class: AppBundle:User
property: username
My loginController function is from the documentation:
public function login(Request $request, AuthenticationUtils $authenticationUtils)
{
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
return $this->render('/login/index.html.twig', array(
'last_username' => $lastUsername,
'error' => $error,
));
}
and the error I'm getting:
Authentication request could not be processed due to a system problem.