On this page
RealName: theme_username
Last updated on
30 April 2025
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.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion