A WordPress user can configure his/her identity (or display name) in the profile. This is stored in the
user_identity global variable. It is set in the pluggable functions
get_currentuserinfo() defined in the file [wordpress root folder]/wp-includes/pluggable-functions.php.
It can be used by theme and plugin authors to display the user name. Instead of using combinations of the user’s first name and lastname, use this global variable as it is according to the preference of the user.
Back to full list of global variables.