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

git-svn-id: http://svn.automattic.com/wordpress/trunk@3488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-01-27 18:14:33 +00:00
parent 10c1b81d0a
commit a225d305fa
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');