RealName: theme_username

Last modified: March 13, 2009 - 14:41

The RealName module intercepts the theme('username',...) and allows extensions in keeping with core issue #192056: User's raw login name should not be output directly.

Format a username with options.

  • Parameters
    $object
    The user object to format, usually returned from user_load(). Note that node and comment objects also contain the necessary information.
    $options
    An associative array of theme options.
    • 'plain' => whether or not to make the name a link (default: FALSE)
    • 'picture' => whether or not to include the user's picture (default: FALSE) Note: will not be done if 'plain' = TRUE.
    • 'homepage' => link may be to the user's homepage (default: TRUE)
    • 'levels' => include user level marking (default: TRUE)
    • 'max_length' => maximum name length to show (default: from settings page)
    • 'not_ver' => whether to show "not verified" (default: from settings page)
  • Return

    A string containing an HTML link to the user's page if the passed object suggests that this is a site user. Otherwise, only the username is returned.

 
 

Drupal is a registered trademark of Dries Buytaert.