WordPress.org

Make WordPress Core

Ticket #23192: 23192.1.patch

File 23192.1.patch, 1.0 KB (added by bananastalktome, 14 months ago)

also update function inline docs to reflect change

  • wp-includes/ms-functions.php

     
    17421742 * Check to see whether a user is marked as a spammer, based on username 
    17431743 * 
    17441744 * @since MU 
    1745  * @uses get_current_user_id() 
    1746  * @uses get_user_id_from_string() 
     1745 * @uses get_user_by() 
    17471746 * 
    17481747 * @param string $username 
    17491748 * @return bool 
    17501749 */ 
    17511750function is_user_spammy( $username = 0 ) { 
    17521751        if ( $username == 0 ) { 
    1753                 $user_id = get_current_user_id(); 
     1752                $user = get_user_by( 'id', get_current_user_id() ); 
    17541753        } else { 
    1755                 $user_id = get_user_id_from_string( $username ); 
     1754                $user = get_user_by( 'login', $username ); 
    17561755        } 
    1757         $u = get_userdata( $user_id ); 
    17581756 
    1759         return ( isset( $u->spam ) && $u->spam == 1 ); 
     1757        return ( isset( $user->spam ) && $user->spam == 1 ); 
    17601758} 
    17611759 
    17621760/** 
     
    20152013                return min( $size, $fileupload_maxk ); 
    20162014 
    20172015        return min( $size, $fileupload_maxk, get_upload_space_available() ); 
    2018 } 
    2019  No newline at end of file 
     2016}