'.' is not in the include path for Polytechnique.org, so the previous patch
[platal.git] / include / register.inc.php
index 4bc0cfc..3a5b51f 100644 (file)
@@ -143,9 +143,13 @@ function check_new_user(&$sub)
     extract($sub);
 
     $prenom  = preg_replace("/[ \t]+/", ' ', trim($prenom));
+    $prenom  = preg_replace("/--+/", '-', $prenom);
+    $prenom  = preg_replace("/''+/", '\'', $prenom);
     $prenom  = make_firstname_case($prenom);
 
     $nom     = preg_replace("/[ \t]+/", ' ', trim($nom));
+    $nom     = preg_replace("/--+/", '-', $nom);
+    $nom     = preg_replace("/''+/", '\'', $nom);
     $nom     = strtoupper(replace_accent($nom));
 
     if ($promo >= 1996) {