if (abs($ref_year - $year) > 2) {
$error[] = "La 'Date de naissance' n'est pas correcte.";
$alert[] = "Date de naissance incorrecte à l'inscription";
- $alert_details .= "\n * Date de naissance renseignée : " . Post::t('birthdate') . ' (date connue : ' . $subState->v('birthdateRef') . ')';
+ $alert_details .= "\n * Date de naissance renseignée : " . Post::t('birthdate');
+ if ($subState->v('birthdateRef') == '0000-00-00') {
+ $alert_details .= ' (date inconnue)';
+ } else {
+ $alert_details .= ' (date connue : ' . $subState->v('birthdateRef') . ')';
+ }
$subState->set('wrong_birthdate', $birth);
}
}
if ($subState->s('birthdateRef') != '0000-00-00'
&& $subState->s('birthdateRef') != $subState->s('birthdate')) {
$alert[] = "Date de naissance incorrecte à l'inscription";
- $alert_details .= "\n * Date de naissance renseignée : " . $subState->s('birthdate') . ' (date connue : ' . $subState->s('birthdateRef') . ')';
+ $alert_details .= "\n * Date de naissance renseignée : " . Post::t('birthdate');
+ if ($subState->v('birthdateRef') == '0000-00-00') {
+ $alert_details .= ' (date inconnue)';
+ } else {
+ $alert_details .= ' (date connue : ' . $subState->v('birthdateRef') . ')';
+ }
}
if ($bannedIp) {
$alert[] = "Tentative d'inscription depuis une IP surveillée";
$_SESSION['subState'] = $subState->dict();
if (count($alert)) {
- $alert_details = "Détails des alertes :" . $alert_details . "\n\n\n";
+ $alert_details = "Détails des alertes :" . $alert_details . "\n\n";
+ $alert_details .= 'Compte concerné : ' . $subState->s('forlife') . ' (redirection vers : '
+ . ($subState->s('email') == '' ? Post::t('email') : $subState->s('email')). ")\n\n\n";
send_warning_mail(implode(' - ', $alert), $alert_details);
}
// Notify other users which were watching for her arrival.
XDB::execute('INSERT INTO contacts (uid, contact)
- SELECT uid, ni_id
+ SELECT uid, {?}
FROM watch_nonins
- WHERE ni_id = {?}', $uid);
+ WHERE ni_id = {?}', $pid, $uid);
XDB::execute('DELETE FROM watch_nonins
WHERE ni_id = {?}', $uid);
Platal::session()->updateNbNotifs();