Refactored accounting

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO
2022-11-29 18:20:17 +01:00
parent cbc852e735
commit a4175cfa11
4 changed files with 51 additions and 31 deletions

View File

@ -73,9 +73,8 @@ class ModelUserUser extends Model {
public function get_email_addresses_from_groups($emails = array()) {
$data = array();
$q = str_repeat("?,", count($emails));
$q = substr($q, 0, strlen($q)-1);
$q = get_q_string($emails);
$query = $this->db->query("SELECT g.email FROM `" . TABLE_GROUP_EMAIL . "` g WHERE g.id IN (SELECT u.id FROM `" . TABLE_GROUP_USER . "` u WHERE u.email IN ($q))", $emails);