Reinstate user_firstname, user_lastname, and user_description in the user object for backwards compat.

git-svn-id: https://develop.svn.wordpress.org/trunk@3488 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-27 18:14:33 +00:00
parent 9bd8f4ee17
commit 47d31a3d8d
1 changed files with 16 additions and 0 deletions

View File

@ -86,6 +86,14 @@ function get_userdata( $user_id ) {
} // end foreach
} //end if
// For backwards compat.
if ( isset($user->first_name) )
$user->user_firstname = $user->first_name;
if ( isset($user->last_name) )
$user->user_lastname = $user->last_name;
if ( isset($user->description) )
$user->user_description = $user->description;
wp_cache_add($user_id, $user, 'users');
wp_cache_add($user->user_login, $user, 'userlogins');
@ -131,6 +139,14 @@ function get_userdatabylogin($user_login) {
}
}
// For backwards compat.
if ( isset($user->first_name) )
$user->user_firstname = $user->first_name;
if ( isset($user->last_name) )
$user->user_lastname = $user->last_name;
if ( isset($user->description) )
$user->user_description = $user->description;
wp_cache_add($user->ID, $user, 'users');
wp_cache_add($user->user_login, $user, 'userlogins');