bug fix url direct access #2936
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user