[wp-trac] [WordPress Trac] #27026: wp_user_query order by meta_value not working when using role insider $args

WordPress Trac noreply at wordpress.org
Wed Feb 5 21:29:46 UTC 2014


#27026: wp_user_query order by meta_value not working when using role insider $args
--------------------------+-----------------------------
 Reporter:  ecommy        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.8.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Regarding:
 https://core.trac.wordpress.org/ticket/21581

 this code will not sort users using last name because of the
 role=subscriber inside args.


 {{{
         $args = array(
                 'role' => 'Subscriber',
                 'orderby' => 'meta_value',
         'order' => 'ASC',
         'meta_key ' => 'last_name',
                 'number' => $limit,
                 'offset' => $offset
         );

         $wp_user_query = new WP_User_Query( $args );
         $users = $wp_user_query->get_results();
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27026>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list