Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Email Rules - Require that users' email addresses match a regular expression Details »»
Email Rules - Require that users' email addresses match a regular expression
Version: 1.0.0, by Analogpoint Analogpoint is offline
Developer Last Online: Dec 2007 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.6.8 Rating:
Released: 10-14-2007 Last Update: Never Installs: 23
Uses Plugins
 
No support by the author.

This modification simply requires a user's email address to match a regular expression that you specify in the admin control panel options. vBulletin already has an email banning function where you can ban different emails and email providers. This mod lets you do the opposite-- require a certain type of email address. For example you could require that all users have a .edu address.

Requested here.

Installation: Unzip the attached file and import the .XML file in the Product Manager in the Admin Control Panel. Then visit the 'Email Rules' options page in vBulletin Options to set up your regular expression.

This mod add two plugins, that's it.

Download Now

File Type: zip product-emailrules-1.0.0.zip (1.4 KB, 113 views)

Screenshots

File Type: png screenshot1.png (31.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-15-2007, 11:17 PM
SMO's Avatar
SMO SMO is offline
 
Join Date: Sep 2005
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow...this is a very good idea. Making it easy for users to register from a certain "realm"

I was trying to think on how to do this with making a military only forum.
Reply With Quote
  #3  
Old 10-15-2007, 11:31 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you specify more than one rule?
Reply With Quote
  #4  
Old 10-16-2007, 08:02 PM
Analogpoint's Avatar
Analogpoint Analogpoint is offline
 
Join Date: Feb 2007
Posts: 656
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo View Post
can you specify more than one rule?
Yes, you specify just one regular expression, but you can have unlimited rules within it. If you need help with a regular expression, just post here explaining what you're trying to accomplish, and I'll try to help.

Also, this website will help get you up to speed on regexes http://www.regular-expressions.info/
Reply With Quote
  #5  
Old 01-28-2008, 06:10 PM
Crazy Serb Crazy Serb is offline
 
Join Date: Mar 2005
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, so if I want to add a few email addresses into the regex field, how would I do it?

let's say, I only want to allow gmail.com, hotmail.com and yahoo.com as valid emails... how do I write that out?
Reply With Quote
  #6  
Old 02-29-2008, 03:48 PM
Crazy Serb Crazy Serb is offline
 
Join Date: Mar 2005
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, so I put the following in the rules field:

Code:
\hotmail.com|gmail.com|yahoo.com$
and some users who tried to register with hotmail.com emails still can't get past the script and keep getting error messages... how?! what's wrong here?
Reply With Quote
  #7  
Old 05-23-2008, 06:35 PM
MISTER2 MISTER2 is offline
 
Join Date: Feb 2007
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, installed on 3.7.0 tested and it works great!
(Tested with single domain restriction)
Reply With Quote
  #8  
Old 09-19-2008, 05:29 AM
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Location: Toronto, ON, Canada
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, so I think I've found a bug.

If you run a board where you want to prevent users from changing their email, either by editing the modifypassword template or by cutting things out of the profile.php file (tried many things, like changing $show['edit_email_field'] to false whether user was on ban list or not, and commenting out whole sections). Anyhow, regardless of how I tried to work it, I couldn't remove the email input fields, because when users tried to change their passwords, they'd be redirected to error pages saying they needed to enter their email (when those spaces didn't exist).

And when I disabled Email Rules, everything worked fine.

Any ideas? Suggestion would be muchly appreciated!
Reply With Quote
  #9  
Old 09-19-2008, 05:32 AM
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Location: Toronto, ON, Canada
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah... and I'm an idiot. If anyone else has this problem, just hack out the fields any way you please, and turn off the plugin at the profile_updatepassword_complete hook... Who needs that when there isn't any way to change it...

Grrr...

Well, so long as others can learn from my mistakes!
Reply With Quote
  #10  
Old 07-24-2009, 07:02 PM
IDEASBANK2009 IDEASBANK2009 is offline
 
Join Date: Jul 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HOW SWEET IS THAT!!!!
Great job and thanks again!
IDEASBANK2009
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04987 seconds
  • Memory Usage 2,317KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete