X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fuser.func.inc.php;h=4c4373158f319eb0b55b2b9a42e8afdc43b5d092;hb=96d5db7deabb190a355d35e7bbd78aa62e23ee30;hp=c08c20bb7bf29b4d204633cab8e11c28d37c425a;hpb=b0470efab965bc6fc6992c230276f72bb241554b;p=platal.git 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) = {?}';