From: Pierre Habouzit (MadCoder Date: Fri, 14 Jan 2005 15:03:13 +0000 (+0000) Subject: send the bestalias here X-Git-Tag: xorg/old~437 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=8ad4b0859e3d0eac9049590b53c651cd4e3dc6a5;p=platal.git send the bestalias here git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-319 --- diff --git a/htdocs/auth-groupex.php b/htdocs/auth-groupex.php index 83c0d1b..d9a07b1 100644 --- a/htdocs/auth-groupex.php +++ b/htdocs/auth-groupex.php @@ -52,12 +52,7 @@ function gpex_make_auth($chlg, $privkey, $datafields) { if (isset($_SESSION[$val])) { $tohash .= $_SESSION[$val]; } else if ($val == 'username') { - $res = $globals->xdb->query( - "SELECT alias - FROM aliases AS al - INNER JOIN auth_user_md5 AS a ON (a.user_id = al.id AND al.type IN('a_vie','alias')) - WHERE a.user_id = {?} AND alias LIKE '%.%' - ORDER BY LENGTH(alias)", Session::getInt('uid')); + $res = $globals->xdb->query("SELECT alias FROM aliases WHERE a.user_id = {?} AND FIND_IN_SET('bestalias', flags)", Session::getInt('uid')); $min_username = $res->fetchOneCell(); $tohash .= $min_username; }