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:
@@ -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())),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user