Loading
Fix URL matching, role filtering, add is_front on authenticated front page
Two issues addressed in AuthenticatedFrontpageSubscriber.php:
- URL/path matching:
- page detection was nested inside the anonymous user check but is now evaluated unconditionally to make it available for use elsewhere in the file
- for node-based configuration, the node ID is read from
$request->attributes->get('_raw_variables'); path configuration handling unchanged
- role filtering:
field_rolesstores unselected roles as['rolename' => 0], so!empty($roles)was always true, silently breaking the "no roles selected = apply to all authenticated users" behaviour. The fix filters to explicitly selected roles only meaning!empty($roles)can now befalse. is_frontTwig variable: when this module redirects authenticated users to a custom front page, is_front remained false on that page. A request attribute now flags the page as the authenticated front, and hook_preprocess_page() sets is_front accordingly.