From d2c882263783436b7cf39f95eebe5edffd7416d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 9 Jan 2009 15:25:47 +0100 Subject: [PATCH] Fixes Xisation of people whose names contain a - in .net. --- include/user.func.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) = {?}'; -- 2.1.4