X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fhomonyms.php;h=3d27903b45bdf622436f32d46849c0889dc6e8e7;hb=ca5367b747459b0984054e2f859ffdf69bbe803c;hp=6de61bc3dfa800d9136023ef3d6332a53716ee67;hpb=c76545c351fae4e2298624ff9ee5bf854dc5a5b6;p=platal.git diff --git a/bin/cron/homonyms.php b/bin/cron/homonyms.php index 6de61bc..3d27903 100755 --- a/bin/cron/homonyms.php +++ b/bin/cron/homonyms.php @@ -1,7 +1,7 @@ #!/usr/bin/php5 -q next()) { $res = XDB::query('SELECT a.hruid - FROM homonyms AS h - INNER JOIN accounts AS a ON (h.uid = a.uid) - WHERE homonyme_id = {?}', - $old['id']); + FROM homonyms_list AS h + INNER JOIN accounts AS a ON (h.uid = a.uid) + WHERE h.hrmid = {?}', + User::makeHomonymHrmid($old['email'])); $hruids = $res->fetchColumn(); - $homonym = User::getSilent($old['id']); - $req = new HomonymeReq($homonym, $old['alias'], $hruids, $old['expire'] > date("Y-m-d")); + $homonym = User::getSilent($old['uid']); + $req = new HomonymeReq($homonym, $old['email'], $hruids, $old['expire'] > date("Y-m-d")); $req->submit(); }