From 519556d35ecb19a0013e4fd837b069d4ac983356 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 27 Oct 2025 14:35:08 +0100 Subject: [PATCH] Only display active new user --- src/Controller/UserController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index bfbcc23..71dd6bd 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -453,7 +453,7 @@ class UserController extends AbstractController $actingUser = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier()); if ($this->userService->hasAccessTo($actingUser, true) && $this->isGranted("ROLE_ADMIN")) { $orgId = $request->query->get('orgId'); - $uos = $this->uoRepository->findBy(['organization' => $orgId], limit: 5, orderBy: ['createdAt' => 'DESC']); + $uos = $this->uoRepository->findBy(['organization' => $orgId, 'isActive' =>true], limit: 5, orderBy: ['createdAt' => 'DESC']); // Map to array (keep isConnected) @@ -560,6 +560,7 @@ class UserController extends AbstractController 'prenom' => $user->getName(), 'email' => $user->getEmail(), 'isConnected' => $this->userService->isUserConnected($user->getUserIdentifier()), + 'statut' => $uo->isActive(), 'showUrl' => $this->generateUrl('user_show', [ 'id' => $user->getId(), 'organizationId' => $uo->getOrganization()->getId(),