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:
parent
10c1b81d0a
commit
a225d305fa
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue