diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 441ce85ec86..607ef8117f6 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -336,7 +336,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; if (!empty($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; } -if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) { +if ((!empty($search_categ) && ($search_categ > 0 || $search_categ == -2)) || !empty($catid)) { // We need this table joined to the select in order to filter by categ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_member as cm ON d.rowid = cm.fk_member"; }