WordPress.org

Make WordPress Core

Ticket #11086: 11086-wp_dropdown_users.3.diff

File 11086-wp_dropdown_users.3.diff, 810 bytes (added by nacin, 8 years ago)

Missing semi-colon.

  • wp-includes/user.php

     
    518518        $r = wp_parse_args( $args, $defaults );
    519519        extract( $r, EXTR_SKIP );
    520520
    521         $query = "SELECT * FROM $wpdb->users";
    522 
     521        $query = "SELECT {$wpdb->users}.* FROM $wpdb->users, $wpdb->usermeta";
    523522        $query_where = array();
    524523
    525524        if ( is_array($include) )
     
    534533        if ( $exclude )
    535534                $query_where[] = "ID NOT IN ($exclude)";
    536535
     536        $query .= " WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$wpdb->prefix}capabilities'";
    537537        if ( $query_where )
    538                 $query .= " WHERE " . join(' AND', $query_where);
     538                $query .= " AND " . join(' AND', $query_where);
    539539
    540540        $query .= " ORDER BY $orderby $order";
    541541