This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/web/core/modules/user/user.views_execution.inc
2018-11-23 12:29:20 +00:00

17 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()];
}