From: Stéphane Jacob Date: Fri, 9 Jan 2009 14:25:47 +0000 (+0100) Subject: Fixes Xisation of people whose names contain a - in .net. X-Git-Tag: xorg/0.10.1~49^2~26 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d2c882263783436b7cf39f95eebe5edffd7416d5;p=platal.git Fixes Xisation of people whose names contain a - in .net. --- diff --git a/include/user.func.inc.php b/include/user.func.inc.php index c08c20b..4c43731 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -103,8 +103,10 @@ function get_not_registered_user($login, $iterator = false) return null; } @list($prenom, $nom, $promo) = explode('.', $login); - $where = 'REPLACE(REPLACE(REPLACE(nom, " ", ""), "-", ""), "\'", "") LIKE CONCAT("%", {?}, "%") - AND REPLACE(REPLACE(REPLACE(prenom, " ", ""), "-", ""), "\'", "") LIKE CONCAT("%", {?}, "%")'; + $where = 'REPLACE(REPLACE(REPLACE(nom, " ", ""), "-", ""), "\'", "") + LIKE CONCAT("%", REPLACE(REPLACE(REPLACE({?}, " ", ""), "-", ""), "\'", ""), "%") + AND REPLACE(REPLACE(REPLACE(prenom, " ", ""), "-", ""), "\'", "") + LIKE CONCAT("%", REPLACE(REPLACE(REPLACE({?}, " ", ""), "-", ""), "\'", ""), "%")'; if ($promo) { if (preg_match('/^[0-9]{2}$/', $promo)) { $where .= 'AND MOD(promo, 100) = {?}';