Bugfix in userfilter.php
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 8 May 2011 16:22:05 +0000 (18:22 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 8 May 2011 16:22:05 +0000 (18:22 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/userfilter.php

index 9dd25c6..026e7e9 100644 (file)
@@ -971,11 +971,11 @@ class UserFilter extends PlFilter
         foreach ($this->sa as $sub => $emails) {
             if (is_null($emails)) {
                 $joins['sa' . $sub] = PlSqlJoin::left('email_source_account', '$ME.uid = $UID');
-            } else if ($key == self::ALIAS_BEST) {
+            } else if ($sub == self::ALIAS_BEST) {
                 $joins['sa' . $sub] = PlSqlJoin::left('email_source_account', '$ME.uid = $UID AND FIND_IN_SET(\'bestalias\', $ME.flags)');
-            } else if ($key == self::ALIAS_FORLIFE) {
+            } else if ($sub == self::ALIAS_FORLIFE) {
                 $joins['sa' . $sub] = PlSqlJoin::left('email_source_account', '$ME.uid = $UID AND $ME.type = \'forlife\'');
-            } else if ($key == self::ALIAS_AUXILIARY) {
+            } else if ($sub == self::ALIAS_AUXILIARY) {
                 $joins['sa' . $sub] = PlSqlJoin::left('email_source_account', '$ME.uid = $UID AND $ME.type = \'alias_aux\'');
             } else {
                 if (!is_array($emails)) {