Fixes the display of aliases on the admin/user/ page.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Fri, 12 Dec 2008 13:26:40 +0000 (14:26 +0100)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Fri, 12 Dec 2008 13:26:40 +0000 (14:26 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
modules/admin.php

index a8ce74b..152c65e 100644 (file)
@@ -662,7 +662,11 @@ class AdminModule extends PLModule
                 "SELECT  alias
                    FROM  virtual
              INNER JOIN  virtual_redirect USING (vid)
-                  WHERE  type = 'user' AND redirect LIKE CONCAT({?}, '@%')", $user->id()));
+                  WHERE  type = 'user' AND (redirect = {?} OR redirect = {?})",
+                $user->forlifeEmail(),
+                // TODO: remove this über-ugly hack. The issue is that you need
+                // to remove all @m4x.org addresses in virtual_redirect first.
+                $user->login() . '@' . $globals->mail->domain2));
 
         $page->assign('aliases', XDB::iterator(
                 "SELECT  alias, type='a_vie' AS for_life,FIND_IN_SET('bestalias',flags) AS best,expire