From: Sam Reed Date: Thu, 24 Mar 2011 20:27:30 +0000 (+0000) Subject: Followup r79549, only try and filter by group (or right) if there are some groups... X-Git-Tag: 1.31.0-rc.0~31208 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=74cfe3df00ed819bb7fee111239247e93a7c638f;p=lhc%2Fweb%2Fwiklou.git Followup r79549, only try and filter by group (or right) if there are some groups to do a WHERE on --- diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index a2657fb4e8..5180ff4e19 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -85,7 +85,7 @@ class ApiQueryAllUsers extends ApiQueryBase { } } - if ( !is_null( $params['group'] ) ) { + if ( !is_null( $params['group'] ) && count( $params['group'] ) ) { $useIndex = false; // Filter only users that belong to a given group $this->addTables( 'user_groups', 'ug1' );