Changeset 9663
- Timestamp:
- 03/30/2015 06:44:55 PM (10 years ago)
- Location:
- branches/2.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/src/bp-core/bp-core-classes.php
r9404 r9663 436 436 restore_current_blog(); 437 437 438 439 440 438 // Grab the first term_relationships clause and convert to a subquery. 441 439 if ( preg_match( '/' . $wpdb->term_relationships . '\.term_taxonomy_id IN \([0-9, ]+\)/', $member_type_sql_clauses['where'], $matches ) ) { 442 440 $sql['where']['member_type'] = "u.{$this->uid_name} IN ( SELECT object_id FROM $wpdb->term_relationships WHERE {$matches[0]} )"; 441 } elseif ( false !== strpos( $member_type_sql_clauses['where'], '0 = 1' ) ) { 442 $sql['where']['member_type'] = $this->no_results['where']; 443 443 } 444 444 } -
branches/2.2/tests/phpunit/testcases/core/class-bp-user-query.php
r9534 r9663 498 498 } 499 499 500 /** 501 * @group member_types 502 * @ticket BP6334 503 */ 504 public function test_should_return_no_results_when_no_users_match_the_specified_member_type() { 505 bp_register_member_type( 'foo' ); 506 $users = $this->factory->user->create_many( 3 ); 507 508 $q = new BP_User_Query( array( 509 'member_type' => 'foo, baz', 510 ) ); 511 512 $this->assertEmpty( $q->results ); 513 } 500 514 501 515 /**
Note: See TracChangeset
for help on using the changeset viewer.