diff --git a/classes/reportbuilder/local/systemreports/matching_users.php b/classes/reportbuilder/local/systemreports/matching_users.php index a4e0bbe..5b720f9 100644 --- a/classes/reportbuilder/local/systemreports/matching_users.php +++ b/classes/reportbuilder/local/systemreports/matching_users.php @@ -54,10 +54,12 @@ protected function initialise(): void { $sql = condition_manager::build_sql_data($conditions); + $this->add_base_fields('DISTINCT u.id'); $this->add_join($sql->get_join()); $this->add_base_condition_sql($sql->get_where(), $sql->get_params()); $this->add_column_from_entity('user:fullnamewithlink'); + $this->add_column_from_entity('user:username'); $this->add_column_from_entity('user:email'); $this->add_column_from_entity('user:idnumber');