WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#27027 closed defect (bug) (duplicate)

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

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

Description

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

Change History (1)

#1 @TobiasBg
6 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.