This commit is contained in:
jleroy2023
2024-11-20 14:49:09 +01:00
parent 21be9ebb52
commit 5b6b44ab9d
5 changed files with 70 additions and 48 deletions

View File

@@ -64,6 +64,7 @@ class ProfileController extends AbstractController
if ($form->get('newPassword')->getData() !== $form->get('confirmPassword')->getData()) {
$this->addFlash('error', "Les mots de passe ne correspondent pas");
return $this->render('profile/edit.html.twig', [
'profile' => $userConnect,
'formProfile' => $form,
]);
}
@@ -74,6 +75,7 @@ class ProfileController extends AbstractController
if ($alreadyExists && $alreadyExists !== $profile) {
$this->addFlash('error', "Ce pseudo existe déjà");
return $this->render('profile/edit.html.twig', [
'profile' => $userConnect,
'formProfile' => $form,
]);
}
@@ -83,6 +85,7 @@ class ProfileController extends AbstractController
if ($alreadyExists && $alreadyExists !== $profile) {
$this->addFlash('error', "Cet email existe déjà");
return $this->render('profile/edit.html.twig', [
'profile' => $userConnect,
'formProfile' => $form,
]);
}
@@ -95,6 +98,7 @@ class ProfileController extends AbstractController
return $this->redirectToRoute('profile_view',['uuid' => $profile->getIdParticipant()]);
}
return $this->render('profile/edit.html.twig', [
'profile' => $userConnect,
'formProfile' => $form,
]);
} catch(\Exception $e) {