Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 18 Jun 2012, 17:37
Artistichaven Artistichaven is offline
 
Join Date: Feb 2011
Prohibit double spaces in username.

Does anyone know how I could stop users from registering with two or more spaces next to each other in their username?

Last edited by Artistichaven; 18 Jun 2012 at 17:49.
Reply With Quote
  #2  
Old 18 Jun 2012, 18:51
Andy Andy is offline
 
Join Date: Oct 2003
I suggest not allowing any spaces at all.
Reply With Quote
  #3  
Old 18 Jun 2012, 19:18
Artistichaven Artistichaven is offline
 
Join Date: Feb 2011
Originally Posted by Andy View Post
I suggest not allowing any spaces at all.
I want to allow spaces, just not double spaces.
Reply With Quote
  #4  
Old 18 Jun 2012, 20:45
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
What version do you have? I find when I test the latest vb3 version (3.8.7PL2) that although the registration page allows me to enter a username with multiple consecutive spaces, they are removed (condensed to one space) when the user is created. But a while back there was an issue where usernames could be duplicated by including some sort of non-printable characters, and there was a regular expression that was given as a work-around. I don't know if 3.8.7PL2 fixes that in some other way or not.
Reply With Quote
  #5  
Old 19 Jun 2012, 15:41
Artistichaven Artistichaven is offline
 
Join Date: Feb 2011
I used ^[A-Za-z0-9 ]+$. I tried adding [^( )], but it didn't work. We're using 3.8.7, let me check the double spaces shrinking thing now.

Edit:
My gosh! You're right, it condenses double spaces.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:53.

Layout Options | Width: Wide Color: