avoid double dash in user names/aliases
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 10 Oct 2005 08:56:44 +0000 (08:56 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 10 Oct 2005 08:56:44 +0000 (08:56 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@88 839d8a87-29fc-0310-9880-83ba4fa771e5

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) {