Changeset 8289
- Timestamp:
- 04/17/2014 07:08:19 PM (11 years ago)
- Location:
- branches/2.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/bp-core/bp-core-classes.php
r8087 r8289 884 884 $sql = array(); 885 885 886 $sql['select_main'] = "SELECT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.display_name, u.user_email";886 $sql['select_main'] = "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.display_name, u.user_email"; 887 887 888 888 if ( 'active' == $type || 'online' == $type || 'newest' == $type ) { -
branches/2.0/tests/testcases/core/class-bp-core-user.php
r7860 r8289 104 104 } 105 105 106 /** 107 * @expectedDeprecated BP_Core_User::get_users 108 * @group get_users 109 * @group type 110 */ 111 public function test_type_alphabetical() { 112 $u1 = $this->create_user( array( 113 'display_name' => 'foo', 114 ) ); 115 $u2 = $this->create_user( array( 116 'display_name' => 'bar', 117 ) ); 118 119 global $wpdb; 120 121 $q = BP_Core_User::get_users( 'alphabetical' ); 122 $found = array_map( 'intval', wp_list_pluck( $q['users'], 'id' ) ); 123 124 $this->assertEquals( array( $u2, $u1 ), $found ); 125 } 126 106 127 public function test_get_specific_users() { 107 128 $u1 = $this->create_user();
Note: See TracChangeset
for help on using the changeset viewer.