From 0dc85a3658bc9dab912c33966f301c7c52446d0d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 3 Jan 2010 20:16:25 +0000 Subject: [PATCH] Followup to r60587: wrong user_groups join --- includes/api/ApiQueryAllUsers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index ba7dd1fb01..a499e9015c 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -65,6 +65,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addWhere('u1.user_name' . $db->buildLike($this->keyToTitle($params['prefix']), $db->anyString())); if (!is_null($params['group'])) { + $useIndex = false; // Filter only users that belong to a given group $this->addTables('user_groups', 'ug1'); $ug1 = $this->getAliasedName('user_groups', 'ug1'); @@ -76,7 +77,6 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addWhere('user_editcount > 0'); if ($fld_groups) { - $useIndex = false; // Show the groups the given users belong to // request more than needed to avoid not getting all rows that belong to one user $groupCount = count(User::getAllGroups()); -- 2.20.1