Show marketing opt-in status in admin users overview

Adds a Marketing column to the admin users table and a total opt-in
count in the header, so admins can see who signed up for updates on
future projects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-07-04 20:48:48 +02:00
co-authored by Claude Sonnet 5
parent ec34a1ddb9
commit 7dbb738da8
2 changed files with 14 additions and 3 deletions
@@ -22,8 +22,11 @@ final class GameAdminUserController extends AbstractController
#[Route('', name: 'game_admin_users', methods: ['GET'])]
public function index(UserRepository $userRepository): Response
{
$users = $userRepository->findBy([], ['id' => 'ASC']);
return $this->render('game/admin/users/index.html.twig', [
'users' => $userRepository->findBy([], ['id' => 'ASC']),
'users' => $users,
'marketingOptInCount' => count(array_filter($users, static fn (User $user) => $user->isMarketingOptIn())),
]);
}