PDA

View Full Version : Mini Mods - Restrict usernames to alphanumeric and underscore


Reynaldovb
27 Feb 2008, 19:56
This is a vB 3.7 port of the same mini mod.
( http://www.vbulletin.org/forum/showthread.php?t=73559 )

What is this Plugin about?

Are you tired of seeing in your forums usernames like these?:
1.- The Super Boy (spaces)
2.- my_new_name (underscore abuse)
3.- imandbar (international characters)

Well, with this simple addon you can prevent that from happening from now on (it can't correct already spoiled usernames). When a user tries to register using one of those chars, a nice error message makes sure the user picks another "normal" name.

Installation instructions
1.- Download the attached .xml
2.- Go to Admin Control Panel => Plugin System => Manage Products => Add/Import Product => and browse for the the location where you downloaded the .xml
3.- Hit Import
4.- To configure it (not really needed, but it is there), go to Vbulletin Forum Options => Restrict Usernames on registration

By default this addon prevents spaces and any char other than numbers and (english) letters while allowing underscore.

**Disclaimer**
This mod is not absolutely necessary as vBulletin allows you to do what this mod does and more from within the Admin Panel:
Admin CP -> vBulletin Options -> vBulletin Options -> User Registration Options -> Username Regular Expression

You only need to use this mod if you don't want to deal with Regular Expressions.

Gray Matter
27 Feb 2008, 20:34
This is already possible in default vBulletin, since 3.6.8 if not sooner.

Admin CP -> vBulletin Options -> vBulletin Options -> User Registration Options -> Username Regular Expression

Which is actually more powerful than your mod is as well.

Reynaldovb
27 Feb 2008, 21:31
Thanks GrayMatter,

As you can see from the previous version thread, http://www.vbulletin.org/forum/showthread.php?t=106877&highlight=restrict
some people are unaware of that feature or they just don't want to deal with Regular Expressions.

Anyway, thanks for the heads up. I will add a disclaimer so people know beforehand that this feature is available from within the ACP as long as they are not scared of RegEx.

Hasann
27 Feb 2008, 21:37
thenk yuuu canim :D:up: good job meeen :D:up:

iogames
27 Feb 2008, 23:55
What if my Real name is imandbar :'(

Mrquarter
28 Feb 2008, 00:04
Thanks dude, that is great!

*Clicks Install*

valdet
28 Feb 2008, 02:36
Great work mate. Thanks.

Zaiaku
28 Feb 2008, 05:39
One of my most favorable mods for vb. Thanks for the update.

Hornstar
28 Feb 2008, 07:47
Thanks, for so long I have been inputting every other symbol I could think of into the disallowed user names list.

Brew
29 Feb 2008, 06:25
Is this the same as using regular expressions that are built into vB 3.7?

Something like:


^[A-Z0-9]+$


In vB options - User Registration Options - Username Regular Expression

Would that have the same effect, or am I missing something about what this mod does?

Thanks!

Reynaldovb
29 Feb 2008, 08:40
Brew:

No. By using RegEx inside vB ACP you have a lot more power restricting what you want and what you don't want (it says that on the disclaimer). This mod just makes it easier and safer and people were asking for a port to 3.7

Brew
29 Feb 2008, 15:12
Brew:

No. By using RegEx inside vB ACP you have a lot more power restricting what you want and what you don't want (it says that on the disclaimer). This mod just makes it easier and safer and people were asking for a port to 3.7

I didn't see the disclaimer...sorry bout dat :)

I'll install this though. It's easier to use than those cryptic expressions.

Good job....thanks!

avsunforum
01 Mar 2008, 16:26
Thanks

acegames
21 Mar 2008, 10:25
Nice mod , easier to use no end :)

KURTZ
21 Mar 2008, 11:11
*KURTZ clicks INSTALL ...

pushedx
25 May 2008, 04:59
"By default spaces are not allowed."

Is this worded intentionally? It'd be simpler if it just said, By default spaces are allowed instead.

I only ask because the variable name says: "ru_allowspace", hence the confusion on the title.

THanks for the mod though, sometimes it's nice to have things like this than mess with the dreadful regex :P

Mum
06 Jun 2008, 09:31
I tried this and installed it and appeared to be working, but i was able to register with a space, regardless of which option it was on.

Uninstalled.

Veer
21 Sep 2008, 15:45
doesn't work

Uninstalled.