From 37fde77b8e684c840bd95a0e941fb06d5f362cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 14 Nov 2022 23:52:10 +0100 Subject: [PATCH] Show special icon in users menu when a user is locked --- src/Repository/NamedDBElementRepository.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Repository/NamedDBElementRepository.php b/src/Repository/NamedDBElementRepository.php index eb2348e4..6e6ee017 100644 --- a/src/Repository/NamedDBElementRepository.php +++ b/src/Repository/NamedDBElementRepository.php @@ -43,6 +43,7 @@ declare(strict_types=1); namespace App\Repository; use App\Entity\Base\AbstractNamedDBElement; +use App\Entity\UserSystem\User; use App\Helpers\Trees\TreeViewNode; class NamedDBElementRepository extends DBElementRepository @@ -63,6 +64,11 @@ class NamedDBElementRepository extends DBElementRepository $node = new TreeViewNode($entity->getName(), null, null); $node->setId($entity->getID()); $result[] = $node; + + if ($entity instanceof User && $entity->isDisabled()) { + //If this is an user, then add a badge when it is disabled + $node->setIcon('fa-fw fa-treeview fa-solid fa-user-lock text-muted'); + } } return $result;