Only display active new user
This commit is contained in:
parent
e4f63c9b85
commit
519556d35e
|
|
@ -453,7 +453,7 @@ class UserController extends AbstractController
|
||||||
$actingUser = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
$actingUser = $this->userService->getUserByIdentifier($this->getUser()->getUserIdentifier());
|
||||||
if ($this->userService->hasAccessTo($actingUser, true) && $this->isGranted("ROLE_ADMIN")) {
|
if ($this->userService->hasAccessTo($actingUser, true) && $this->isGranted("ROLE_ADMIN")) {
|
||||||
$orgId = $request->query->get('orgId');
|
$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)
|
// Map to array (keep isConnected)
|
||||||
|
|
@ -560,6 +560,7 @@ class UserController extends AbstractController
|
||||||
'prenom' => $user->getName(),
|
'prenom' => $user->getName(),
|
||||||
'email' => $user->getEmail(),
|
'email' => $user->getEmail(),
|
||||||
'isConnected' => $this->userService->isUserConnected($user->getUserIdentifier()),
|
'isConnected' => $this->userService->isUserConnected($user->getUserIdentifier()),
|
||||||
|
'statut' => $uo->isActive(),
|
||||||
'showUrl' => $this->generateUrl('user_show', [
|
'showUrl' => $this->generateUrl('user_show', [
|
||||||
'id' => $user->getId(),
|
'id' => $user->getId(),
|
||||||
'organizationId' => $uo->getOrganization()->getId(),
|
'organizationId' => $uo->getOrganization()->getId(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue