vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Disallow spaces in Username on registration? (https://vborg.vbsupport.ru/showthread.php?t=200596)

pianoman993 01-03-2009 10:56 PM

Disallow spaces in Username on registration?
 
Is it possible to disallow spaces in the username during registration? If so how?

All help is greatly appreciated!

- Pianoman993

Kirk Y 01-03-2009 11:05 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=159222" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=159222</a>

pianoman993 01-03-2009 11:51 PM

I did that but then it would not let anybody register.

It just keeps saying

Quote:

That username is already in use or does not meet the administrator's standards. If you are ilovemusic and you have forgotten your password, click here.
To everything, spaces or no spaces. Any ideas why?

Kirk Y 01-04-2009 12:08 AM

Sorry, Dismounted's REGEX must be off.

Give this a try (little rusty, but should work) --
Code:

^[a-zA-Z0-9]+$
Should allow only upper/lower alphanumeric.

pianoman993 01-04-2009 04:40 AM

Great thank you! I'll try that out and get back to you :)

Dismounted 01-04-2009 04:48 AM

You shouldn't actually need the uppercase "A-Z", as vBulletin automatically makes it case-insensitive.
Code:

^[a-z0-9]+$


All times are GMT. The time now is 02:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00998 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete