Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27027 closed defect (bug) (duplicate)

wp_user_query order by meta_value not working when using role insider $args

Reported by: ecommy's profile ecommy Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8.1
Component: General Keywords:
Focuses: Cc:



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();

Change History (1)

#1 @TobiasBg
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #27026

Note: See TracTickets for help on using tickets.