The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Use a different test. http://php.net/manual/en/function.strpos.php
|
|
#3
|
|||
|
|||
|
I think the expression should be
Code:
^[A-Z0-9]+$ Of course, none of this will affect any existing names. |
| Благодарность от: | ||
| Lynne | ||
|
#4
|
|||
|
|||
|
Quote:
I appreciate the response. |
|
#5
|
|||
|
|||
|
You both forgot lower case letters and a few other characters. Just saying.
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
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?
|
| Благодарность от: | ||
| TheLastSuperman | ||
|
#8
|
|||
|
|||
|
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. |
|
#9
|
|||
|
|||
|
Yes. A user should then only be able to create a user name with letters and numbers only.
|
| Благодарность от: | ||
| TheLastSuperman | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|