X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fhomonyms.php;h=e4e9db0fe9ee691f19f7715772052386b9500860;hb=3424387cde6c635ff16c3b5459c4caa88bb76e2e;hp=6de61bc3dfa800d9136023ef3d6332a53716ee67;hpb=12ddbc2037b16496dfb9d91c4f7091850146fcde;p=platal.git diff --git a/bin/cron/homonyms.php b/bin/cron/homonyms.php index 6de61bc..e4e9db0 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(); } -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>