This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/core/modules/user/user.views_execution.inc

18 lines
368 B
PHP
Raw Normal View History

<?php
/**
* @file
* Provide views runtime hooks for user.module.
*/
use Drupal\views\ViewExecutable;
/**
* Implements hook_views_query_substitutions().
*
2018-11-23 12:29:20 +00:00
* Allow replacement of current user ID so we can cache these queries.
*/
function user_views_query_substitutions(ViewExecutable $view) {
2017-04-13 14:53:35 +00:00
return ['***CURRENT_USER***' => \Drupal::currentUser()->id()];
}