From 4b797c353cadbbaafe68ff0002844a31bc44ccd0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 21 Mar 2011 22:51:11 +0100 Subject: [PATCH] Properly orders login by length. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- plugins/insert.getUserName.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/insert.getUserName.php b/plugins/insert.getUserName.php index ce34a96..7caa9a2 100644 --- a/plugins/insert.getUserName.php +++ b/plugins/insert.getUserName.php @@ -43,7 +43,7 @@ function smarty_insert_getUsername() return XDB::fetchOneCell('SELECT email FROM email_source_account WHERE uid = {?} AND type != \'alias_aux\' - ORDER BY NOT FIND_IN_SET(\'bestalias\', flags), MIN(email)', + ORDER BY NOT FIND_IN_SET(\'bestalias\', flags), CHAR_LENGTH(email)', $id); } -- 2.1.4