public function recoverAction(Form $passwordRecoverForm, $isValid, $hash)
{
if ($isValid) {
$customer = $this->get('elcodi.repository.customer')->findOneBy(['recoveryHash' => $hash]);
if ($customer instanceof AbstractUser) {
$password = $passwordRecoverForm->get('password')->getData();
$this->get('elcodi.manager.password')->recoverPassword($customer, $hash, $password);
return $this->redirectToRoute('store_homepage');
}
}
return $this->renderTemplate('Pages:user-password-change.html.twig', ['form' => $passwordRecoverForm->createView()]);
}