From: Stéphane Jacob Date: Mon, 21 Mar 2011 21:51:11 +0000 (+0100) Subject: Properly orders login by length. X-Git-Tag: xorg/1.1.0~19 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4b797c353cadbbaafe68ff0002844a31bc44ccd0;p=platal.git Properly orders login by length. Signed-off-by: Stéphane Jacob --- 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); }