WordPress.org

Make WordPress Core

Ticket #23192: 23192.patch

File 23192.patch, 826 bytes (added by ocean90, 5 years ago)
  • wp-includes/ms-functions.php

     
    17481748 */
    17491749function is_user_spammy( $username = 0 ) {
    17501750        if ( $username == 0 ) {
    1751                 $user_id = get_current_user_id();
     1751                $user = get_user_by( 'id', get_current_user_id() );
    17521752        } else {
    1753                 $user_id = get_user_id_from_string( $username );
     1753                $user = get_user_by( 'login', $username );
    17541754        }
    1755         $u = get_userdata( $user_id );
    17561755
    1757         return ( isset( $u->spam ) && $u->spam == 1 );
     1756        return ( isset( $user->spam ) && $user->spam == 1 );
    17581757}
    17591758
    17601759/**
     
    20132012                return min( $size, $fileupload_maxk );
    20142013
    20152014        return min( $size, $fileupload_maxk, get_upload_space_available() );
    2016 }
    2017  No newline at end of file
     2015}