You are here

function socialbase_preprocess_username in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  2. 8 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  3. 8.2 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  4. 8.3 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  5. 8.4 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  6. 8.5 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  7. 8.6 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
  8. 8.8 themes/socialbase/socialbase.theme \socialbase_preprocess_username()

Implements theme_preprocess_username().

File

themes/socialbase/socialbase.theme, line 150
The primary PHP file for the Social base theme.

Code

function socialbase_preprocess_username(&$variables) {
  $account = $variables['account'] ?: new AnonymousUserSession();

  // Override the default drupal truncate function for all user names,
  // so the whole name will be displayed.
  $variables['name'] = $account
    ->getDisplayName();
}