You are here

function user_views_query_substitutions in Views (for Drupal 7) 5

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

Allow replacement of current userid so we can cache these queries

File

modules/views_user.inc, line 213

Code

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