drupal/core/modules/user/user.views_execution.inc

19 lines
371 B
PHP
Raw Normal View History

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