You are here

function user_views_query_substitutions in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 8.3 modules/user.views.inc \user_views_query_substitutions()
  2. 5 modules/views_user.inc \user_views_query_substitutions()
  3. 6.3 modules/user.views.inc \user_views_query_substitutions()
  4. 6.2 modules/user.views.inc \user_views_query_substitutions()

Allow replacement of current userid so we can cache these queries.

File

modules/user.views.inc, line 605
Provide views data and handlers for user.module.

Code

function user_views_query_substitutions($view) {
  global $user;
  return array(
    '***CURRENT_USER***' => intval($user->uid),
  );
}