From: Stéphane Jacob Date: Mon, 28 Mar 2011 07:32:40 +0000 (+0200) Subject: Fixes query. X-Git-Tag: xorg/1.1.1~37^2~42 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=983c2a9a69cb2935f224049855a223bbdfbd1bdb;p=platal.git Fixes query. Signed-off-by: Stéphane Jacob --- 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;