MyBB Central

Full Version: Preventing symbols in usernames
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I searched the Mybb board and found nothing on this topic.

How can I prevent members using certain symbols in their username? I'm starting to get members using email addresses as a username - to me this is a spam alert - and other symbols that could prevent SQL's and what not from running the right results if certain queries are run.

I'd like to prevent things like slashes, apostrophies, quotation marks and the @ symbol among a few others.

Can it be done?
Is it in there already and I am just not seeing it? If so, where is this?
Where would I edit to do this?
Would I need to insert code, and if so, what would that be?

Maybe this could be a future upgrade for Mybb. Some kind of area in the control panel where you can put in what you want to disallow.
You can do it with a plugin only. But it's not difficult to do.
Is there a plugin for this? As you know, I am useless with code so making one myself is not going to happen.

Lol Your idea of not difficult and mine are two entirely different things!
Sorry but I'm bumping this up in case anyone else may have an answer.
I am having a lot of stupid spammers joining my hockey site with websites and emails as usernames and I need to prevent this some how.
Yep its a good idea mate. I am not sure if a plugin is available currently but will have a look around and see. Smile
Here is an update to a 2006 plugin I made. I call it "Normal Usernames".

It's not tested but it should work. Let me know if it doesn't. It will only allow alphanumerical and whitespace characters. At least it should.

Do some testing.
Thanks labrocca! I'll test this out on my test forum and let you know how it works.
Didn't work. I was able to register on my site as [email protected]

I'd like the thing to be able to exclude www in a row too if possible. I know it's a stretch to do this with the possiblities of problems for people and names but what are the odds that someone has a legit www in a name?

com is too common *see? to exclude but the www is easy. JMO, you'd know better how to do this.
Okay try this one...make sure you activate it in admincp too.

And this will not error for www but it will for . or @ and other special characters..it's basically going to allow alphabet, numbers, and spaces.
I seem to have a problem with my test board all together!

I've got a TON of plugins in there and not one of them is showing in the admin cp.

When I read your reply above I realized I never checked the admin cp to activate the original one I took. I'm taking the new one but I have to tell you I can't see ANY plugins in my plugin panel in the acp!

Have you been in there labrocca at all? If so, would whatever you did cause the plugins not to show up?

3 mins later:

OK hold the phone..... I just deleted the original plugin before I hit send just to see what happens. All the plugins are there again. So, something in the original code is not right thus making them all disappear.

NO plugins are activated on the test board unless I want to "see" them in action.

Going to put this latest one in now - hang on:
OK this one does not make the plugins disappear.

Going to check it's workability now- hang on:
Excellent! This one works!

I tried with "ignats"@#$%* and it refused once I hit enter.
You might want to make a note for others taking this that the software will show that the username is available when they type it in and then tell them it's no good only after they hit the send button to register.

THANKS! This is much appreciated.
Yeah that's because of the ajax. I ain't gonna bother dealing with that. This is just a quick fix for you.

Sorry about that last file. It has a typo error but I did say it was untested. Smile
Pages: 1 2