From 983c2a9a69cb2935f224049855a223bbdfbd1bdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 28 Mar 2011 09:32:40 +0200 Subject: [PATCH] Fixes query. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/emails.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/emails.inc.php b/include/emails.inc.php index d4ddaca..6abdede 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -348,7 +348,8 @@ class Bogo $this->user = &$user; $res = XDB::fetchOneAssoc('SELECT COUNT(DISTINCT(action)) AS action_count, COUNT(redirect) AS redirect_count, action FROM email_redirect_account - WHERE uid = {?} AND (type = \'smtp\' OR type = \'googleapps\') AND flags = \'active\'', + WHERE uid = {?} AND (type = \'smtp\' OR type = \'googleapps\') AND flags = \'active\' + GROUP BY uid', $user->id()); if ($res['redirect_count'] == 0) { return; -- 2.1.4