$limit = $params['limit'];
$this->addTables('user', 'u1');
+ $useIndex = true;
if (!is_null($params['from']))
$this->addWhere('u1.user_name >= ' . $db->addQuotes($this->keyToTitle($params['from'])));
$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());
$this->addFieldsIf('u1.user_registration', $fld_registration);
$this->addOption('ORDER BY', 'u1.user_name');
- $u1 = $this->getAliasedName('user', 'u1');
- $this->addOption('USE INDEX', array($u1 => 'user_name'));
+ if ($useIndex) {
+ $u1 = $this->getAliasedName('user', 'u1');
+ $this->addOption('USE INDEX', array($u1 => 'user_name'));
+ }
$res = $this->select(__METHOD__);