View Full Version : Forbid the use of some symbols in USERNAME
ghroob
09-25-2005, 10:00 PM
Hi all...
It came to my mind to put a code to forbid the use of some characters & symbols in members' usernames when they first register at my forums..
Sometimes usage of these characters & symbols leads to usernames like: .:*#juggler#*:. and so..
this code simply allow users to just register with Letters, Numbers and Space..
share your opinion :)
Salam..
Boofo
09-26-2005, 08:00 AM
You can just add whatever characters you don't want them to use in the vBulletin options. ;)
ghroob
09-26-2005, 08:04 AM
You can just add whatever characters you don't want them to use in the vBulletin options. ;)
Ok.. u r right..
but my solution is the alternate if u just dont want to type all these symbols in your vbulletin options :)
What would be nice is the ability to deny spaces in usernames at reg.
(Boofo: where can we specify characters? Is it the place we specify names?)
ghroob
09-26-2005, 08:30 AM
[QUOTE=kall]What would be nice is the ability to deny spaces in usernames at reg.
QUOTE]
you can remove whatever characters u want..
to deny the usage of SPACE do the following:
open the plugin PHP Code,
then search for this piece of code
if(!in_array(ord($chars[$i]),Array(32,48,49,50,51,52,53,54,55,56,57,65,66,67, 68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84 ,85,86,87,88,89,90,97,98,99,100,101,102,103,104,10 5,106,107,108,109,110,111,112,113,114,115,116,117, 118,119,120,121,122,194,195,196,197,198,199,200,20 1,202,203,204,205,206,207,208,209,210,211,212,213, 214,216,217,218,219,220,221,222,223,225,227,228,22 9,230,237)))
then remove the number "32" and the comma following it from the array ;)
Regards,
Boofo
09-26-2005, 08:34 AM
What would be nice is the ability to deny spaces in usernames at reg.
(Boofo: where can we specify characters? Is it the place we specify names?)
That where I have it and you should be able to use the space code in there to not allow spaces too, I would think.
[QUOTE=kall]What would be nice is the ability to deny spaces in usernames at reg.
QUOTE]
you can remove whatever characters u want..
to deny the usage of SPACE do the following:
open the plugin PHP Code,
then search for this piece of code
if(!in_array(ord($chars[$i]),Array(32,48,49,50,51,52,53,54,55,56,57,65,66,67, 68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84 ,85,86,87,88,89,90,97,98,99,100,101,102,103,104,10 5,106,107,108,109,110,111,112,113,114,115,116,117, 118,119,120,121,122,194,195,196,197,198,199,200,20 1,202,203,204,205,206,207,208,209,210,211,212,213, 214,216,217,218,219,220,221,222,223,225,227,228,22 9,230,237)))
then remove the number "32" and the comma following it from the array ;)
Regards,
ghroob, if you weren't just pixels representing text on my screen, I might just kiss you.
@Boofo: You too...if you mean or can tell me. :)
Daniel
09-26-2005, 10:18 PM
Where can we edit the symbols in vbulletin options?
This is a wonderful hack, thank you very much! :)
Xplorer4x4
09-28-2005, 05:07 AM
Where can we edit the symbols in vbulletin options?
Find the settings group(in vb otions) for: User Registration Options
Then find the setting for: Illegal User Names
Then just enter _ or * or any other charechter in there.
ghroob
09-29-2005, 08:16 AM
thanx all for ur comments,,
and for any suggestions or updates im here :)
-=Sniper=-
10-11-2005, 12:38 PM
excellent, thanks
cpzhao
11-02-2005, 07:32 PM
Thank you! this is exactly what I need. I would remove the space by default if I were you, though
gldtn
11-18-2005, 08:05 AM
Thank you! this is exactly what I need. I would remove the space by default if I were you, though
does this work with vb3.5.1? I cannot find Phrase type Error Messages
Thanks in advance
Acido
11-22-2005, 04:44 AM
does this work with vb3.5.1? I cannot find Phrase type Error Messages
Thanks in advance
Search Front-End Errors Messages ;)
------------------------------
I'm using this hack. But it show a error message for each character wrong in the nickname. If user enter 3 symbols, then he will see this:
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Is it a bug?
Ideas to solve it?
Marco van Herwaarden
11-22-2005, 09:44 AM
Search Front-End Errors Messages ;)
------------------------------
I'm using this hack. But it show a error message for each character wrong in the nickname. If user enter 3 symbols, then he will see this:
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Username may only contain Letters, Numbers and Space
Is it a bug?
Ideas to solve it?In the plugin, find: $userdata->error('forbiddenusername');Add under:
break;
(Not tested)
-=Sniper=-
11-22-2005, 10:39 AM
that fixed it! thanks
Ghanem
12-11-2005, 12:00 AM
thank you for the hack..
how can I implement on Arabic charcters and space only..
icemann
12-11-2005, 03:33 AM
This is great for the lazy people like me, thanks & worked perfect. :)
*clicks install*
quanvo81
01-04-2006, 09:44 PM
This is a cool hack, not install it rite now , but I will look forward to it.
calvin.krause
04-12-2007, 08:55 PM
Does this work in version 3.6? Because I can't seem to get it to...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.