Ticket #10041: 10041-user.php.patch
File 10041-user.php.patch, 867 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/user.php
802 802 $searches = array(); 803 803 $leading_wild = ( 'leading' == $wild || 'both' == $wild ) ? '%' : ''; 804 804 $trailing_wild = ( 'trailing' == $wild || 'both' == $wild ) ? '%' : ''; 805 $like = $leading_wild . $wpdb->esc_like( $string ) . $trailing_wild; 806 805 807 foreach ( $cols as $col ) { 806 if ( 'ID' == $col ) 808 if ( 'ID' == $col ) { 807 809 $searches[] = $wpdb->prepare( "$col = %s", $string ); 808 else 809 $searches[] = $wpdb->prepare( "$col LIKE %s", $leading_wild . $wpdb->esc_like( $string ) . $trailing_wild ); 810 } else { 811 $searches[] = $wpdb->prepare( "$col LIKE %s", $like ); 812 } 810 813 } 811 814 812 815 return ' AND (' . implode(' OR ', $searches) . ')';