From be88a8f6d587f5e12518199771fc6cb3419ecf05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 3 Nov 2009 11:10:11 +0100 Subject: [PATCH] Sends recovery email to every redirection (including GApps...). --- modules/platal.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/platal.php b/modules/platal.php index 739839e..1279260 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -328,10 +328,16 @@ class PlatalModule extends PLModule if ($res->numRows()) { $mails = $res->fetchOneCell(); } else { - $res = XDB::query('SELECT email + $user = User::getSilent($uid); + $mails = $user->bestEmail(); + $res = XDB::query("SELECT email FROM emails - WHERE uid = {?} AND NOT FIND_IN_SET("filter", flags)', $uid); - $mails = implode(', ', $res->fetchColumn()); + WHERE uid = {?} AND NOT FIND_IN_SET('filter', flags) + AND NOT FIND_IN_SET('active', flags)", + $uid); + if ($res->numRows() > 0) { + $mails .= ', ' . implode(', ', $res->fetchColumn()); + } } $mymail = new PlMailer(); $mymail->setFrom('"Gestion des mots de passe" mail->domain . '>'); -- 2.1.4