Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Automatically deny registration for users with multi-dotted email address Details »
Automatically deny registration for users with multi-dotted email address
Mod Version: 1.00, by cloferba (Contributor) cloferba is offline
Developer Last Online: Oct 2023 I like it Show Printable Version Email this Page

vB Version: 4.2.0 Rating: (3 votes - 4.33 average) Installs: 18
Released: 27 May 2012 Last Update: Never Downloads: 0
Not Supported Uses Plugins Re-usable Code Translations  

On my forum many bots have multi-dotted email address so I wanted to avoid them to create a new account on my forum.

The way to do this is create a new plugin to recognize these multi-dotted email address provided at time of registration and delete them automatically.

Steps:
  • Create a new plugin using hook userdata_start
  • Use this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It only checks the part before the '@', so set $max_dots to the number of dots you will allow (I think one dot in an email name probably isn't unusual, but that's up to you). Also, this uses the default 'bademail' phrase, but if you'd rather have a special error messages for "too many dots" you can create a phrase and use the varname in place of 'bademail'.

Special thanks to kh99 who provided this solution.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 27 May 2012, 20:09
copjend copjend is offline
 
Join Date: May 2011
Many thank
Reply With Quote
  #3  
Old 27 May 2012, 20:15
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
If you use email verification, that should catch the phony email addresses so they wouldn't be able to register, anyway.
Reply With Quote
  #4  
Old 27 May 2012, 20:36
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
This plugin (not a MOD) was suggested to me based on my post that was answered by kh99 at http://www.vbulletin.org/forum/showp...12&postcount=3

It doesn't delete registrants with multi-dotted emails, it merely prevents them from actually registering.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | StopForumSpam
Reply With Quote
  #5  
Old 27 May 2012, 20:49
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
This is a good idea.

To prevent brain strain, can you easily tell me how to also check for semicolons or colons before the @? For a while I was getting Chinese bots with email address like gobbledygoop;[email protected]
Reply With Quote
  #6  
Old 27 May 2012, 21:43
Snowhog's Avatar
Snowhog Snowhog is offline
 
Join Date: Oct 2011
Real name: Paul L
You could write two additional plugins (give each a unique plugin name) using the code with only a slight modification.

Plugin to deny registration if email address contains any colons preceding the @

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Plugin to deny registration if email address contains any semicolons preceding the @

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I'm sure that these could be incorporated into the original plugin, but I'm not a coder, so maybe kh99 can suggest how to do that.
__________________
"It is a capital mistake to theorize in advance of the facts." - Sherlock Holmes
Kubuntu Forums . Net | StopForumSpam

Last edited by Snowhog; 27 May 2012 at 22:16.
Reply With Quote
  #7  
Old 27 May 2012, 21:52
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You should be able to do a preg_match to cover all of them in a single piece of code.
Reply With Quote
  #8  
Old 27 May 2012, 22:53
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Thanks. I'll play around with this a bit and see if I can make it one if a or b or c statement.
Reply With Quote
  #9  
Old 27 May 2012, 23:26
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Maybe make it a setting where you can add what to exclude.
Reply With Quote
  #10  
Old 27 May 2012, 23:37
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
That's probably a bit beyond my vBulletin skills.
Reply With Quote
  #11  
Old 28 May 2012, 00:53
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
I have complete faith in you, sir.
Reply With Quote
  #12  
Old 28 May 2012, 01:24
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
LOL. Well you're not going to get rich that way.
Reply With Quote
  #13  
Old 28 May 2012, 01:40
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
I'll always be rich in friendship with you as a friend.
Reply With Quote
  #14  
Old 28 May 2012, 02:46
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by Snowhog View Post
You could write two additional plugins (give each a unique plugin name) using the code with only a slight modification.
That's a good thought, but unfortunately it won't work the way this is written. It replaces the code that verifies an email address, so if you have multiple plugins doing the same thing, only the last one to run would have any effect.

You might be able to do something like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


(But I haven't tested it at all).
Reply With Quote
  #15  
Old 28 May 2012, 02:52
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You could even make the array a setting option to expand it.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:20.

Layout Options | Width: Wide Color: