X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fprofile_modification.php;h=d08a03ffba315fb977fa2a49c741d2e0a7293dfb;hb=3424387cde6c635ff16c3b5459c4caa88bb76e2e;hp=ec240cba4d2e415cee4d0cb8f0d8dd56e2d4bddd;hpb=d645ceb701b0e8aa1de2e5271bed35e56ef169f1;p=platal.git diff --git a/bin/cron/profile_modification.php b/bin/cron/profile_modification.php index ec240cb..d08a03f 100755 --- a/bin/cron/profile_modification.php +++ b/bin/cron/profile_modification.php @@ -1,7 +1,7 @@ #!/usr/bin/php5 -q total() > 0) { $pid = $values['pid']; $sex = ($values['sex'] == 'female') ? 1 : 0; $yourself = $values['yourself']; - $alias = $values['alias']; + $user = User::getSilentWithUID($values['uid']); $hrpid = $values['hrpid']; $modifications = array(); $modifications[] = array( @@ -54,7 +53,7 @@ if ($res->total() > 0) { while ($values = $res->next()) { if ($values['pid'] != $pid) { $mailer = new PlMailer('profile/notification.mail.tpl'); - $mailer->addTo($alias . '@' . $globals->mail->domain); + $mailer->addTo($user); $mailer->assign('modifications', $modifications); $mailer->assign('yourself', $yourself); $mailer->assign('hrpid', $hrpid); @@ -66,7 +65,7 @@ if ($res->total() > 0) { $pid = $values['pid']; $sex = ($values['sex'] == 'female') ? 1 : 0; $yourself = $values['yourself']; - $alias = $values['alias']; + $user = User::getSilentWithUID($values['uid']); $hrpid = $values['hrpid']; $modifications[] = array( 'full_name' => $values['full_name'], @@ -76,7 +75,7 @@ if ($res->total() > 0) { ); } $mailer = new PlMailer('profile/notification.mail.tpl'); - $mailer->addTo($alias . '@' . $globals->mail->domain); + $mailer->addTo($user); $mailer->assign('modifications', $modifications); $mailer->assign('yourself', $yourself); $mailer->assign('hrpid', $hrpid); @@ -88,5 +87,5 @@ if ($res->total() > 0) { WHERE type = \'third_party\''); } -// 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: ?>