Make WordPress Core


Ignore:
Timestamp:
11/16/2005 02:54:23 AM (19 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r3092 r3102  
    300300function get_user_option( $option ) {
    301301    global $wpdb, $current_user;
    302     if ( isset( $current_user->data->{$wpdb->prefix . $option} ) ) // Blog specific
    303         return $current_user->data->{$wpdb->prefix . $option};
    304     elseif ( isset( $current_user->data->{$option} ) ) // User specific and cross-blog
    305         return $current_user->data->{$option};
     302    if ( isset( $current_user->{$wpdb->prefix . $option} ) ) // Blog specific
     303        return $current_user->{$wpdb->prefix . $option};
     304    elseif ( isset( $current_user->{$option} ) ) // User specific and cross-blog
     305        return $current_user->{$option};
    306306    else // Blog global
    307307        return get_option( $option );
Note: See TracChangeset for help on using the changeset viewer.