Invalid Credentials. Symfony

[Solved] Invalid Credentials. Symfony | Php Frameworks Symfony - Code Explorer | yomemimo.com
Question : invalid credentials. symfony

Answered by : abdulhakim

private $passwordHasher;
public function __construct(UserPasswordHasherInterface $passwordHasher)
{ $this->passwordHasher = $passwordHasher;
}
if ($form->isSubmitted() && $form->isValid()) { $user->setRoles(['ROLE_USER']); $user->setPassword($this->passwordHasher->hashPassword($user, $user->getPassword()); $entityManager = $this->getDoctrine()->getManager(); $entityManager->persist($user); $entityManager->flush(); return $this->redirectToRoute('home');
}

Source : | Last Update : Fri, 03 Jun 22

Answers related to Invalid credentials. symfony

Code Explorer Popular Question For Php Frameworks Symfony