X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fregistrations.php;h=91cb1ac99d89ab5039605cb2b9c9aada63fb4591;hb=3731beb2ec0ae6e363dd348011aa48ecc31106d6;hp=bf20e878b1e75473a646ca17c7ae4856770731a0;hpb=ce0d7be772306674fadaf020511871aba1683816;p=platal.git diff --git a/bin/cron/registrations.php b/bin/cron/registrations.php index bf20e87..91cb1ac 100755 --- a/bin/cron/registrations.php +++ b/bin/cron/registrations.php @@ -5,11 +5,11 @@ require 'connect.db.inc.php'; $message = ''; -$res = XDB::iterRow("SELECT a.registration_date, a.hruid, e.email - FROM accounts AS a - INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms)) - INNER JOIN profile_display AS pd ON (ap.pid = pd.pid) - LEFT JOIN emails AS e ON (a.uid = e.uid AND NOT FIND_IN_SET('filter', e.flags)) +$res = XDB::iterRow("SELECT a.registration_date, a.hruid, s.email + FROM accounts AS a + INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET('owner', ap.perms)) + INNER JOIN profile_display AS pd ON (ap.pid = pd.pid) + LEFT JOIN email_source_account AS s ON (a.uid = s.uid) WHERE a.registration_date > {?} GROUP BY a.hruid ORDER BY pd.promo",