From 931c6ba216d662bf78b6ae1ecfcf02b0356aa3d8 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 15 Oct 2024 11:46:42 +0200 Subject: [PATCH] bug fix url direct access #2936 --- web/modules/custom/decoupled/decoupled.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/decoupled/decoupled.module b/web/modules/custom/decoupled/decoupled.module index 1d16452..6388afb 100644 --- a/web/modules/custom/decoupled/decoupled.module +++ b/web/modules/custom/decoupled/decoupled.module @@ -35,13 +35,15 @@ function decoupled_page_attachments(array &$attachments) { $redirect = false; $current_path = \Drupal::service('path.current')->getPath(); $route_name = \Drupal::routeMatch()->getRouteName(); - // $route_parameters = \Drupal::routeMatch()->getParameters()->all(); - // ksm($route_parameters); $current_language = \Drupal::languageManager()->getCurrentLanguage()->getId(); $is_front = \Drupal::service('path.matcher')->isFrontPage(); if (!$is_front) { $redirect = true; } + if(preg_match('/^\/?user\/.*/', $current_path)){ + $redirect = false; + } + $entity_type = null; $entity_bundle = null; $entity_id = null;