![]() |
Disallow Space in Username
Hello folks,
I have googled this already before coming here, and my research has not been successful. I know how to accomplish this through modifying the code, but I want to minimize modifying vbulletin standard code to keep the files scalable with updates. I use the Username Regular Expression : ^[A-Z0-9] Which the help function suggests disallows spaces. However, users are still popping up with spaces in their usernames. |
Use a different test. http://php.net/manual/en/function.strpos.php
|
Quote:
Code:
^[A-Z0-9]+$ Of course, none of this will affect any existing names. |
Quote:
I appreciate the response. |
You both forgot lower case letters and a few other characters. Just saying.
|
Quote:
PHP Code:
The 'i' in the siU at the end means ignore case, so that expression will allow lower case. I did mention that no other characters would be allowed, but I added to that post in case it wasn't clear what I meant. |
So if I put this code "^[A-Z0-9]+$" to Username Regular Expression in vBulletin Options, that should be worked? So user cannnot make username that has space in it. Am I right?
|
Quote:
Thanks for pointing out that code @Kh99. I had no idea they appended to the regular expression. I learn at least 10 things every day around here. |
Quote:
|
All times are GMT. The time now is 01:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|