function theme_username


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 theme_username($variables)
cle7 theme_username($variables)
elmsmedia7 theme_username($variables)
icor7 theme_username($variables)
meedjum_blog7 theme_username($variables)
mooc7 theme_username($variables)

Returns HTML for a username, potentially linked to the user's page.


$variables: An associative array containing:

  • account: The user object to format.
  • name: The user's name, sanitized.
  • extra: Additional text to append to the user's name, sanitized.
  • link_path: The path or URL of the user's profile page, home page, or other desired page to link to for more information about the user.
  • link_options: An array of options to pass to the l() function's $options parameter if linking the user's name to the user's page.
  • attributes_array: An array of attributes to pass to the drupal_attributes() function if not linking to the user's page.

See also



Related topics

50 theme calls to theme_username()
bakery_pull_form_validate in sites/all/modules/ulmus/bakery/bakery.module
Make sure we are not trying to request an existing user.
blog_page_user in modules/blog/
Menu callback; displays a Drupal page containing recent blog entries of a given user.
comment_admin_overview in modules/comment/
Form builder for the comment overview administration form.
comment_form in modules/comment/comment.module
Generate the basic commenting form, for appending to a node or display on a separate page.
contact_personal_form in modules/contact/
Form constructor for the personal contact form.

... See full list

76 string references to the theme hook from theme_username()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

backup_migrate_destination_db::_get_db_connection in sites/all/modules/ulmus/backup_migrate/includes/
Get the db connection for the specified db.
backup_migrate_destination_db_mysql::destinations in sites/all/modules/ulmus/backup_migrate/includes/
Declare any mysql databases defined in the settings.php file as a possible destination.
backup_migrate_update_2004 in sites/all/modules/ulmus/backup_migrate/backup_migrate.install
Allowing non-int profile ids 2009-07-01
bakery_pull_form_validate in sites/all/modules/ulmus/bakery/bakery.module
Make sure we are not trying to request an existing user.
bakery_settings in sites/all/modules/ulmus/bakery/bakery.module
Admin settings, see INSTALL.txt

... See full list


includes/, line 2235
The theme system, which controls the output of Drupal.


function theme_username($variables) {
  if (isset($variables['link_path'])) {
    // We have a link path, so we should generate a link using l().
    // Additional classes may be added as array elements like
    // $variables['link_options']['attributes']['class'][] = 'myclass';
    $output = l($variables['name'] . $variables['extra'], $variables['link_path'], $variables['link_options']);
  else {
    // Modules may have added important attributes so they must be included
    // in the output. Additional classes may be added as array elements like
    // $variables['attributes_array']['class'][] = 'myclass';
    $output = '<span' . drupal_attributes($variables['attributes_array']) . '>' . $variables['name'] . $variables['extra'] . '</span>';
  return $output;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.