Make WordPress Core


Ignore:
Timestamp:
07/21/2010 08:10:22 PM (14 years ago)
Author:
ryan
Message:

Use get_current_user() and get_current_user_id() instead of global current_user object. Props filofo. fixes #13934 for 3.0.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-includes/ms-functions.php

    r15403 r15452  
    376376
    377377function is_blog_user( $blog_id = 0 ) {
    378     global $current_user, $wpdb;
    379 
     378    global $wpdb;
     379 
     380    $current_user = wp_get_current_user();
    380381    if ( !$blog_id )
    381382        $blog_id = $wpdb->blogid;
     
    13231324function is_user_spammy( $username = 0 ) {
    13241325    if ( $username == 0 ) {
    1325         global $current_user;
    1326         $user_id = $current_user->ID;
     1326        $user_id = get_current_user_id();
    13271327    } else {
    13281328        $user_id = get_user_id_from_string( $username );
     
    13611361
    13621362function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
    1363     global $current_user, $wpdb;
    1364 
     1363    global $wpdb;
     1364
     1365    $current_user = wp_get_current_user();
    13651366    if ( $user_id == 0 )
    13661367        $user_id = $current_user->ID;
Note: See TracChangeset for help on using the changeset viewer.