Only display active new user

This commit is contained in:
Charles 2025-10-27 14:35:08 +01:00
parent e4f63c9b85
commit 519556d35e
1 changed files with 2 additions and 1 deletions

View File

@ -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(),