Pull the values in WP_User::data directly into WP_User so that we don't have to do ->data->blah.

git-svn-id: https://develop.svn.wordpress.org/trunk@3102 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-11-16 02:54:23 +00:00
parent b8f0875533
commit 62f1fd972b
6 changed files with 65 additions and 64 deletions
+4 -4
View File
@@ -299,10 +299,10 @@ function get_option($option) {
function get_user_option( $option ) {
global $wpdb, $current_user;
if ( isset( $current_user->data->{$wpdb->prefix . $option} ) ) // Blog specific
return $current_user->data->{$wpdb->prefix . $option};
elseif ( isset( $current_user->data->{$option} ) ) // User specific and cross-blog
return $current_user->data->{$option};
if ( isset( $current_user->{$wpdb->prefix . $option} ) ) // Blog specific
return $current_user->{$wpdb->prefix . $option};
elseif ( isset( $current_user->{$option} ) ) // User specific and cross-blog
return $current_user->{$option};
else // Blog global
return get_option( $option );
}