Title: User Identity Variables
Last modified: August 18, 2016

---

# User Identity Variables

 *  Resolved [jeragogo](https://wordpress.org/support/users/jeragogo/)
 * (@jeragogo)
 * [20 years ago](https://wordpress.org/support/topic/user-identity-variables/)
 * I want to display the author’s first name in the admin header template instead
   of the display name. I found the code for ID, Password, e-mail, etc., but nothing
   for first name. Does this exist?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years ago](https://wordpress.org/support/topic/user-identity-variables/#post-386267)
 * From the Codex, author tags: [http://codex.wordpress.org/Template_Tags#Author_tags](http://codex.wordpress.org/Template_Tags#Author_tags)
 *  Thread Starter [jeragogo](https://wordpress.org/support/users/jeragogo/)
 * (@jeragogo)
 * [20 years ago](https://wordpress.org/support/topic/user-identity-variables/#post-386272)
 * Yes, I found that, but I want to change the Admin Header template. This is the
   code `<?php printf(__('Howdy, **%s**.'), $user_identity) ?>` I would like to 
   replace. The options for this line can be seen at [http://codex.wordpress.org/Function_Reference/get_currentuserinfo](http://codex.wordpress.org/Function_Reference/get_currentuserinfo),
   but I can’t find the code to display the nickname. If there isn’t any I can cope–
   it would just be a nice addition.
 *  [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * (@pizdin_dim)
 * [20 years ago](https://wordpress.org/support/topic/user-identity-variables/#post-386283)
 * Have a look here:
 * [http://wordpress.org/support/topic/66762/](http://wordpress.org/support/topic/66762/)
 *  Thread Starter [jeragogo](https://wordpress.org/support/users/jeragogo/)
 * (@jeragogo)
 * [20 years ago](https://wordpress.org/support/topic/user-identity-variables/#post-386640)
 * I stumbled on the solution for this. In the file **pluggable-functions.php** 
   in the **wp-includes** directory there are two lists at the beginning of the 
   document. One is for the set_current_user function and the other is for get_current_user.
   I added the variables for the information I wanted to retrieve to each of these
   lists. Now I am able to get first name, last name and nickname in addition to
   the variables listed [here](http://codex.wordpress.org/Function_Reference/get_currentuserinfo).
 * This is the modified code:
    `if ( !function_exists('set_current_user') ) : function
   set_current_user($id, $name = '') { global $user_login, $userdata, $user_level,
   $user_fname, $user_lname, $user_nickname, $user_ID, $user_email, $user_url, $
   user_pass_md5, $user_identity, $current_user;
 *  $current_user = '';
 *  $current_user = new WP_User($id, $name);
 *  $userdata = get_userdatabylogin($user_login);
 *  $user_login = $userdata->user_login;
    $user_level = $userdata->user_level; $
   user_fname = $userdata->first_name; $user_lname = $userdata->last_name; $user_nickname
   = $userdata->nickname; $user_ID = $userdata->ID; $user_email = $userdata->user_email;
   $user_url = $userdata->user_url; $user_pass_md5 = md5($userdata->user_pass); 
   $user_identity = $userdata->display_name;
 * I had a feeling it would be easy! Hopefully this will help future customization
   freaks like me.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘User Identity Variables’ is closed to new replies.

## Tags

 * [get_user](https://wordpress.org/support/topic-tag/get_user/)
 * [nickname](https://wordpress.org/support/topic-tag/nickname/)
 * [user_level](https://wordpress.org/support/topic-tag/user_level/)

 * 4 replies
 * 3 participants
 * Last reply from: [jeragogo](https://wordpress.org/support/users/jeragogo/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/user-identity-variables/#post-386640)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
