From aca54585dcd431240a0286adf6007b1ceb5a672a Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 25 Feb 2011 13:59:54 +0100 Subject: [PATCH] Bestalias should not be expired. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/emails.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/emails.inc.php b/include/emails.inc.php index e1750a7..35621e2 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -178,7 +178,7 @@ function fix_bestalias(User $user) { $count = XDB::fetchOneCell('SELECT COUNT(*) FROM email_source_account - WHERE uid = {?} AND FIND_IN_SET(\'bestalias\', flags)', + WHERE uid = {?} AND FIND_IN_SET(\'bestalias\', flags) AND expire IS NULL', $user->id()); if ($count == 1) { @@ -196,7 +196,7 @@ function fix_bestalias(User $user) // related to a usage name and contains a '.'. XDB::execute("UPDATE email_source_account SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'bestalias') - WHERE uid = {?} + WHERE uid = {?} AND expire IS NULL ORDER BY NOT FIND_IN_SET('usage', flags), email LIKE '%.%', LENGTH(email) LIMIT 1", $user->id()); -- 2.1.4