function user_views_query_substitutions

Allow replacement of current userid so we can cache these queries

File

drupal/core/modules/user/user.views.inc, line 452
Provide views data and handlers for user.module.

Code

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