X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fregister.php;h=5df8c93f425a8cd7a06fd32bc1c16493cab2cb97;hb=330888b0f0e5354441c5a0a92a9cefa5ef97ecf2;hp=c09d68dc278756a0c86b399e289505d09aff5128;hpb=ed92ea696e042eb9b2d0efcc4731fdf89fb17924;p=platal.git diff --git a/modules/register.php b/modules/register.php index c09d68d..5df8c93 100644 --- a/modules/register.php +++ b/modules/register.php @@ -56,11 +56,11 @@ class RegisterModule extends PLModule FROM register_marketing AS m INNER JOIN accounts AS a ON (m.uid = a.uid) INNER JOIN account_profiles AS ap ON (a.uid = ap.uid AND FIND_IN_SET('owner', ap.perms)) - INNER JOIN profiles AS p ON (p.pid = ap.uid) + INNER JOIN profiles AS p ON (p.pid = ap.pid) INNER JOIN profile_display AS pd ON (p.pid = pd.pid) INNER JOIN profile_name AS pnl ON (p.pid = pnl.pid AND pnl.typeid = {?}) INNER JOIN profile_name AS pnf ON (p.pid = pnf.pid AND pnf.typeid = {?}) - WHERE m.hash = {?}", + WHERE m.hash = {?} AND a.state = 'pending'", $nameTypes['name_ini'], $nameTypes['firstname_ini'], $hash); if ($res->numRows() == 1) { @@ -280,11 +280,11 @@ class RegisterModule extends PLModule FROM register_pending AS r INNER JOIN accounts AS a ON (r.uid = a.uid) INNER JOIN account_profiles AS ap ON (a.uid = ap.uid AND FIND_IN_SET('owner', ap.perms)) - INNER JOIN profiles AS p ON (p.pid = ap.uid) + INNER JOIN profiles AS p ON (p.pid = ap.pid) INNER JOIN profile_name AS pnl ON (p.pid = pnl.pid AND pnl.typeid = {?}) INNER JOIN profile_name AS pnf ON (p.pid = pnf.pid AND pnf.typeid = {?}) INNER JOIN profile_display AS pd ON (p.pid = pd.pid) - WHERE hash = {?} AND hash != 'INSCRIT'", + WHERE hash = {?} AND hash != 'INSCRIT' AND a.state = 'pending'", $nameTypes['name_ini'], $nameTypes['firstname_ini'], $hash); if (!$hash || $res->numRows() == 0) { $page->kill("

Cette adresse n'existe pas, ou plus, sur le serveur.

@@ -449,12 +449,13 @@ class RegisterModule extends PLModule SET success = NOW() WHERE uid = {?}", $uid); + $market = array(); while (list($senderid, $maketingEmails, $lastDate) = $res->next()) { $sender = User::getWithUID($senderid); - $market[] = " - par $sender->fullName() sur $maketingEmails (le plus récemment le $lastDate)"; + $market[] = " - par {$sender->fullName()} sur $maketingEmails (le plus récemment le $lastDate)"; $mymail = new PlMailer('register/marketer.mail.tpl'); $mymail->setSubject("$firstname $lastname s'est inscrit à Polytechnique.org !"); - $mymail->addTo("\"$sender->fullName()\" <$sender->bestEmail()@{$globals->mail->domain}>"); + $mymail->addTo($sender); $mymail->assign('sender', $sender); $mymail->assign('firstname', $firstname); $mymail->assign('lastname', $lastname);