![]() |
Restrict usernames to alphanumeric and underscore
This is a vB 3.5.x port of the same mini mod.
( https://vborg.vbsupport.ru/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.- im?a??nd?b?ar (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. ** Fixed to work with 3.6.8 and 3.7 |
--- This space left intentionally blank ---
|
I got some new members that been using emails as user name would this block the @ symbol?
thank you |
Quote:
In short: yes, it would block the @ symbol as well the dot used in .com|.net |
thank you.
|
good job
thanks |
thank you, simple yet effective.
installed !!! |
I've it installed on my forums. Thanks!
|
Thanks, just what I needed. I have another piece of software which feeds usernames off of the vbulletin user file and it doesn't like non-alphanumeric characters in the username - so this will be ideal.
|
I remember when I moved from Xoops to vBulletin I wanted to start clean and "correct" those names with non alphanumeric chars, so I made an small tool that checked every name and if it didnt comply, changed it to normal standards.
It was a brute and ugly tool, but it did the job. After that I emailed all the users in the forum letting them know that some of them had their name changed, and included their current name in the email (vBulletin mailing system). If you would want me to release that tool, I would be glad to help you get your forums "clean". LOL |
How does this interact with the default User Registration Options > Illegal User Names settings? I have some names and symbols in there already. Should I just leave them there? Remove the symbols and leave the words?
|
Quote:
This mod goes beyond that. You can still enter names on that vB setting, but the mod will prevent people from using any symbols that you hadnt explicity allowed (through the mod options). |
Quote:
BTW, here's what I currently have in my default illegal username field: Code:
admin moderator ' ! @ # $ % ^ &* ( ) + | - = \ { [ } } : ; ' " < , > ? / ~ ` ' www .com |
I have no idea, which one goes first. It would probably be the best idea to delete the symbols and leave just names there.
|
Quote:
Thanks! Great hack! |
Thanks alot Reynaldovb!
That was pretty quick of you to come up with the port! :D Very Happy!! |
Thanks, I've been wanting something like this to block out all the annoying symbols people manage to find.
*installs* |
Does this plugin allow you to use 1 underscore and just prevent the use of multiple underscores?
|
Quote:
By the way, did you mean multiple underscores like this: my_nick_name or like this: my___nickname |
What happens to users who already have illegal characters? Will they still be able to login or update their info?
|
Quote:
If I remember correctly, I think I saw somewhere a piece of Search and Replace SQL code you could use to do a massive search and replace. Of course you would be wise to back up your database first and email the users letting them know about the change in their names. |
Cool, I'm fine with the existing members, I just want to restrict people who use email addresses as usernames. Ideally I'd love to be able to stop people using all uppercase names too but I guess we can't have everything.
Also ... If I wanted to allow more than one character (EG ~ and -) would I seperate them with spaces or commas? Anyway, thank you ... just installed :) |
LOL
This is a cool hack. You know what, I will creat alots more user names with space, @, uppercase....I think around hundreds of them, then install this hack. The result is, the user names I created will be .... RARE . It means I can trade for something else if a member want that nick so bad . LOL, just like Yahoo ! rare nicks. Lol, just a thought, I am not going have free time just to sit there and manual add users. But I will wait untill my board get busy and lots of users sign up, then I will installed this hack. At that time my board will be crazy with rare nicks trading. thanks again. |
installed. thanks!
|
Works perfectly!
Thanks! |
Thank you
Install |
Thank you for writing this plugin. It is a complete asset!
The default username restriction seems exceptionary while this system is inclusionary, meaning the default system lets you create exceptions for what you can register, while this system lets you include what can be registered. This is much better IMO because people could keep finding characters that you haven't put on your ban list, and you would have to make an exception for each one. It is very important for sites like mine which in the end will have MediaWiki integrated into it. MediaWiki can only allow printable characters in page names, and page names can be user names, so user names must be only printable characters. This hack solves the problem. Again, thank you. Installed. |
[HOW-TO] Allow Russian Letters
Option 1: Type А-я in the "custom symbol box". Option 2: In register_addmember_process, FIND Code:
$ru_searchpattern .= "]+/"; Code:
$ru_searchpattern .= "А-я"; |
Thx! Installed :)
|
this works on 3.5.4 and can be fully uninstalled right? sounds good to me.
|
I get this in my template... "Could not find phrase 'username_invalidchars'."
3.6 beta 4... any help? |
Quote:
so do i!! |
Quote:
any solution ? |
I will throw my hat in here as well. Is there a fix? The error is coming about due to PHRASETYPEID which has been removed in versions 3.6.x. Everything else works well except for the error message. Someone may know enough about SQL to make the plugin point to the correct phrase. I am only a beginner but I wouldn't think it would be too difficult.
|
I'm running version 3.6.5
I have attached my version. or get the one from the download and do this: Find: Code:
eval('$userdata->errors[] = "' . fetch_phrase('username_invalidchars', PHRASETYPEID_ERROR) . '";'); Code:
$userdata->error('username_invalidchars'); |
Anyone know if this has been done in 3.7?
|
I upgraded to 3.7 and it seems to be working, but I don't know if it would work on a brand new board. I would have to check and make the necessary corrections.
|
Working on a fix...
|
Great! I'm just trying to go through all of my currently installed mods and see if they will work with 3.7 when we update.
|
Quote:
I dont have 3.5 version or lower anymore so I cant guarantee if it works with those. |
All times are GMT. The time now is 10:28 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:
|