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
2018-11-23 12:29:20 +00:00

18 lines
368 B
PHP

<?php
/**
* @file
* Provide views runtime hooks for user.module.
*/
use Drupal\views\ViewExecutable;
/**
* Implements hook_views_query_substitutions().
*
* Allow replacement of current user ID so we can cache these queries.
*/
function user_views_query_substitutions(ViewExecutable $view) {
return ['***CURRENT_USER***' => \Drupal::currentUser()->id()];
}