Closed (duplicate)
Project:
User Import
Version:
5.x-1.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2007 at 23:14 UTC
Updated:
15 Aug 2007 at 19:07 UTC
In user_import.module v1.17.2.4, function _user_import_sanitise_username() strips out periods, hyphens and underscores but these are explicitly allowed in the 5.x user registration (username field description says "Your preferred username; punctuation is not allowed except for periods, hyphens, and underscores."). I made the following change to allow usernames with periods:
--- modules/user_import/user_import.module (revision 4864)
+++ modules/user_import/user_import.module (working copy)
@@ -1171,7 +1171,7 @@
if ($sanitised == 0) {
// username cannot contain an illegal character
- $username = preg_replace('/[^a-zA-Z0-9@ ]/', ' ', $username);
+ $username = preg_replace('/[^a-zA-Z0-9@ \.\-_]/', ' ', $username);
// username cannot contain multiple spaces in a row
$username = preg_replace('/[ ]+/', ' ', $username);
Comments
Comment #1
mfbduplicate of http://drupal.org/node/139500