You are here

function _commons_profile_get_current_user in Drupal Commons 6.2

Helper function to get the current user being viewed

2 calls to _commons_profile_get_current_user()
commons_profile_views_pre_view in modules/features/commons_profile/commons_profile.module
Implementation of hook_views_pre_view()
_commons_profile_image_links_block_view in modules/features/commons_profile/commons_profile.blocks.inc
Generate the profile image and action links block

File

modules/features/commons_profile/commons_profile.module, line 144

Code

function _commons_profile_get_current_user() {
  static $account = FALSE;
  if (!$account) {
    if (arg(0) == 'user' && is_numeric(arg(1))) {
      $account = user_load(arg(1));
    }
  }
  return $account;
}