profile done
This commit is contained in:
@@ -29,11 +29,13 @@ class ProfileController extends AbstractController
|
||||
$userConnect = $token?->getUser();
|
||||
$currentProfile = $profileRepo->findOneBy(['idParticipant' => $uuid]);
|
||||
if ($userConnect->getIdParticipant() !== $currentProfile->getIdParticipant()) {
|
||||
$this->addFlash('error', "Vous ne pouvez pas consulter un profil qui n'est pas le votre");
|
||||
return $this->redirectToRoute('home');
|
||||
$isActiveUser = false;
|
||||
} else {
|
||||
$isActiveUser = true;
|
||||
}
|
||||
return $this->render('profile/view.html.twig', [
|
||||
'profile' => $currentProfile,
|
||||
'isActiveUser' => $isActiveUser,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user