WordPress.org

Make WordPress Core

Ticket #23368: user.php.patch

File user.php.patch, 583 bytes (added by gandham, 15 months ago)
  • .php

    old new  
    419419                        $orderby = $qv['orderby']; 
    420420                } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) { 
    421421                        $orderby = 'display_name'; 
    422                 } elseif ( 'post_count' == $qv['orderby'] ) { 
     422                } elseif ( 'random' == $qv['orderby'] || 'rand' == $qv['orderby'] ) { 
     423                        $orderby = 'RAND()'; 
     424                } 
     425                elseif ( 'post_count' == $qv['orderby'] ) { 
    423426                        // todo: avoid the JOIN 
    424427                        $where = get_posts_by_author_sql('post'); 
    425428                        $this->query_from .= " LEFT OUTER JOIN (