You are here

function me_user_view in me aliases 7

Same name and namespace in other branches
  1. 8 me.module \me_user_view()

Implements hook_user_view().

File

./me.module, line 698
Provides 'me' aliases to allow users to enter 'me' in common paths instead of their user id.

Code

function me_user_view($account, $view_mode) {
  if (me_variable_get('me_user_override')) {
    $enabled = 'enabled';
    if (!empty($account->me_disable)) {
      $enabled = 'disabled';
    }
    $account->content['me'] = array(
      '#type' => 'markup',
      '#value' => t("'%me' aliases are {$enabled} for this account. Account user id is '@uid'.", array(
        '%me' => _me_get_me_alias(TRUE),
        '@uid' => $account->uid,
      )),
      '#weight' => 10,
    );
  }
}