[notifyall] Fix email selection
authorPhilipp <admin@philipp.info>
Tue, 3 Jan 2023 13:01:45 +0000 (14:01 +0100)
committerGitHub <noreply@github.com>
Tue, 3 Jan 2023 13:01:45 +0000 (14:01 +0100)
FollowUp #1313

notifyall/notifyall.php

index ee05407..727290b 100644 (file)
@@ -50,7 +50,7 @@ function notifyall_post(App $a)
                $condition['email'] = array_column($adminEmails, 'email');
        }
 
-       $recipients = DBA::p("SELECT DISTINCT `email` FROM `user`" . DBA::buildCondition($condition));
+       $recipients = DBA::p("SELECT DISTINCT `email` FROM `user`" . DBA::buildCondition($condition), $condition);
 
        if (! $recipients) {
                DI::sysmsg()->addNotice(DI::l10n()->t('No recipients found.'));