$value, $user->profile()->id());
}
$visibility = ($value == 'public');
+ exit;
}
$page->assign('actuel', $alias);
$actifs = Env::v('emails_actifs', Array());
print_r(Env::v('emails_rewrite'));
if (Env::v('emailop') == "ajouter" && Env::has('email')) {
+ $error_email = false;
$new_email = Env::v('email');
if ($new_email == "new@example.org") {
$new_email = Env::v('email_new');
}
$result = $redirect->add_email($new_email);
if ($result == ERROR_INVALID_EMAIL) {
+ $error_email = true;
$page->assign('email', $new_email);
}
$page->assign('retour', $result);
+ $page->assign('error_email', $error_email);
} elseif (empty($actifs)) {
$result = ERROR_INACTIVE_REDIRECTION;
} elseif (is_array($actifs)) {
. $user->forlifeEmail() . ' ne fonctionnerait plus.');
break;
case ERROR_INVALID_EMAIL:
- $page->trigError('Erreur: l\'email n\'est pas valide.');
+ $page->trigError('Erreur : l\'email n\'est pas valide.');
break;
case ERROR_LOOP_EMAIL:
$page->trigError('Erreur : ' . $user->forlifeEmail()
$sel = Xdb::query(
"SELECT acc.uid, count(e.email) AS nb_mails,
IFNULL(pd.public_name, acc.full_name) AS fullname,
- IFNULL(pd.promo, 0) AS promo,
- FROM aliases AS a
- INNER JOIN accounts AS acc ON a.id = acc.uid
- LEFT JOIN emails AS e ON (e.uid = acc.uid
- AND FIND_IN_SET('active', e.flags) AND e.panne = 0)
- LEFT JOIN account_profiles AS ap ON (acc.uid = ap.uid AND FIND_IN_SET('owner', ap.perms))
- LEFT JOIN profile_display AS pd ON (pd.pid = ap.pid)
+ IFNULL(pd.promo, 0) AS promo
+ FROM aliases AS a
+ INNER JOIN accounts AS acc ON (a.uid = acc.uid)
+ LEFT JOIN emails AS e ON (e.uid = acc.uid
+ AND FIND_IN_SET('active', e.flags) AND e.panne = 0)
+ LEFT JOIN account_profiles AS ap ON (acc.uid = ap.uid AND FIND_IN_SET('owner', ap.perms))
+ LEFT JOIN profile_display AS pd ON (pd.pid = ap.pid)
WHERE a.alias = {?}
GROUP BY acc.uid", $alias);
if ($x = $sel->fetchOneAssoc()) {
if ($x['nb_mails'] == 0) {
- register_profile_update($x['uid'], 'broken');
+ $user = User::getSilentWithUID($x['uid']);
+ $profile = $user->profile();
+ WatchProfileUpdate::register($profile, 'broken');
}
fputcsv($csv, array($x['fullname'], $x['promo'], $alias,
join(',', $mails), $x['nb_mails'],