p.birthdate_ref AS birthdateRef, FIND_IN_SET('watch', a.flags) AS watch, m.hash
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.id AND FIND_IN_SET('owner', ap.perms))
- INNER JOIN profiles AS p ON (p.pid = ap.id)
+ 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 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 = {?})
$bannedEmail = true;
}
}
- if ($subState->has('watch')) {
+ if ($subState->i('watch') != 0) {
$alert .= "Inscription d'un utilisateur surveillé - ";
}
. " pour nous faire part de cette erreur.";
} else {
$subState->set('step', 4);
- if ($subState->count('backs') >= 3) {
+ if ($subState->v('backs')->count() >= 3) {
$alert .= "Fin d'une inscription hésitante.";
}
finishRegistration($subState);
$mymail->assign('birthdate_ref', $birthdate_ref);
$mymail->assign('forlife', $forlife);
$mymail->assign('email', $email);
+ $mymail->assign('logger', S::logger());
if (count($market) > 0) {
$mymail->assign('market', implode("\n", $market));
}
new UFC_UID($subState->i('xorg_id')),
new PFC_Not(new UFC_Dead())
));
- $user = $uf->getProfiles();
+ $profile = $uf->getProfile();
- if ($user->__get('state') == 'active') {
+ if ($profile->__get('state') == 'active') {
return "Tu es déjà inscrit ou ton matricule est incorrect !";
}
- if ($user->promo() != $subState->s('promo')) {
+ if ($profile->promo() != $subState->s('promo')) {
return 'Le matricule est incorrect.';
}
- if (!$user->compareNames($subState->s('firstname'), $subState->s('lastname'))) {
+ if (!$profile->compareNames($subState->s('firstname'), $subState->s('lastname'))) {
return "Erreur dans l'identification. Réessaie, il y a une erreur quelque part !";
}
- $subState->set('lastname', $user->lastName());
- $subState->set('firstname', $user->firstName());
- $subState->set('uid', $user->id());
- $subState->set('watch', $user->watch());
- $subState->set('birthdateRef', $user->profile->__get('birthdate_ref'));
+ $subState->set('lastname', $profile->lastName());
+ $subState->set('firstname', $profile->firstName());
+ $subState->set('uid', $profile->owner()->id());
+ $subState->set('watch', $profile->owner()->watch);
+ $subState->set('birthdateRef', $profile->__get('birthdate_ref'));
return true;
}
$subState->set('lastname', $profile->lastName());
$subState->set('firstname', $profile->firstName());
$subState->set('uid', $profile->owner()->id());
- $subState->set('watch', $profile->owner()->watch());
+ $subState->set('watch', $profile->owner()->watch);
$subState->set('birthdateRef', $profile->__get('birthdate_ref'));
$subState->set('xorgid', $profile->__get('xorg_id'));
return true;
while ($profile = $it->next()) {
if ($profile->compareNames($subState->s('firstname'), $subState->s('lastname'))) {
$subState->set('uid', $profile->owner()->id());
- $subState->set('watch', $profile->owner()->watch());
+ $subState->set('watch', $profile->owner()->watch);
$subState->set('birthdateRef', $profile->__get('birthdate_ref'));
$subState->set('xorgid', $profile->__get('xorg_id'));
return 'Tu es vraisemblablement déjà inscrit !';
$mymail = new PlMailer('register/end.mail.tpl');
$mymail->assign('emailXorg', $subState->s('bestalias'));
- $mymail->assign('lemail', $subState->s('email'));
+ $mymail->assign('to', $subState->s('email'));
$mymail->assign('baseurl', $globals->baseurl);
$mymail->assign('hash', $hash);
- $mymail->assign('subj', $subState->s('bestalias') . '@' . $globals->mail->domain);
+ $mymail->assign('subject', $subState->s('bestalias') . '@' . $globals->mail->domain);
$mymail->send();
}