Make WordPress Core


Ignore:
Timestamp:
06/24/2010 03:01:29 PM (14 years ago)
Author:
ryan
Message:

Use get_current_user() and get_current_user_id() instead of global . Props filofo. see #13934 for trunk

File:
1 edited

Legend:

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

    r15290 r15315  
    373373
    374374function is_blog_user( $blog_id = 0 ) {
    375     global $current_user, $wpdb;
    376 
     375    global $wpdb;
     376 
     377    $current_user = wp_get_current_user();
    377378    if ( !$blog_id )
    378379        $blog_id = $wpdb->blogid;
     
    13201321function is_user_spammy( $username = 0 ) {
    13211322    if ( $username == 0 ) {
    1322         global $current_user;
    1323         $user_id = $current_user->ID;
     1323        $user_id = get_current_user_id();
    13241324    } else {
    13251325        $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.