function socialbase_preprocess_username in Open Social 8
Same name and namespace in other branches
- 8.9 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.2 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.3 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.4 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.5 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.6 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.7 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
- 8.8 themes/socialbase/socialbase.theme \socialbase_preprocess_username()
Implements theme_preprocess_username().
File
- themes/
socialbase/ socialbase.theme, line 119 - 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();
}