aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/mailtousers.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/mailtousers.php b/admin/mailtousers.php
index 2ed9e3158..c2539a398 100644
--- a/admin/mailtousers.php
+++ b/admin/mailtousers.php
@@ -96,12 +96,12 @@ where
$query = '
select
- id user_id, username, mail_address
+ u.id user_id, u.username, u.mail_address
from
- '.USERS_TABLE.'
+ '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.id = m.user_id
where
- mail_address is not null and
- id not in (select user_id from '.USER_MAIL_NOTIFICATION_TABLE.')
+ u.mail_address is not null and
+ m.user_id is null
order by
id;';