Closed (fixed)
Project:
User Preference Login Redirect
Version:
1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Feb 2026 at 12:19 UTC
Updated:
20 Feb 2026 at 10:59 UTC
Jump to comment: Most recent
Comments
Comment #2
anybodyShould be a relatively simple database query plus a controller.
Comment #5
ben280398 commentedAdded a "Statistics" page as a tab next to the settings page. The page displays a table showing:
Route label
Route path
Number of users with that preference
It also shows:
Deleted routes (routes in user data but no longer in config) - helps detect broken settings
Users with no preference set (using default)
Changes made
Added src/Controller/StatisticsController.php - Controller that queries the users_data table and builds the statistics table
Updated user_preference_login_redirect.routing.yml - Added route for /admin/config/people/user-preference-login-redirect/statistics
Updated user_preference_login_redirect.links.task.yml - Added tab link to settings page
Updated tests/src/Functional/UserPreferenceLoginRedirectTest.php - Added tests for statistics page
Merge Request is linked here for ease of tracking:
https://git.drupalcode.org/project/user_preference_login_redirect/-/merg...
Comment #6
anybodyThis is great!
Just move the database query into a helper service and use dependency injection to inject it as written in #3570994: Add a bulk "Set default" form and we can merge this!
Great work @ben280398 (while I'm quite sure AI helped a lot? ;))
Thanks!!
Comment #7
anybodyThanks, commented!
Comment #8
anybodyPerfect @ben280398 - this looks great!
Comment #9
anybodyMerged so you can proceed on the other issues! :)