![]() |
Email Rules - Require that users' email addresses match a regular expression
1 Attachment(s)
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. |
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. |
can you specify more than one rule?
|
Quote:
Also, this website will help get you up to speed on regexes http://www.regular-expressions.info/ |
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? |
ok, so I put the following in the rules field:
Code:
\hotmail.com|gmail.com|yahoo.com$ |
Awesome, installed on 3.7.0 tested and it works great!
(Tested with single domain restriction) |
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! :) |
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! |
HOW SWEET IS THAT!!!! :D
Great job and thanks again! IDEASBANK2009 |
All times are GMT. The time now is 12:37 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:
|