The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm creating a website for the military. I'd like the registration to query if their registration email address is coming from a .mil addres. If it is, they get a "Verified" status and get plugged into a verified group. Is this possible? If not, is there another way to do it? Thanks!
|
|
#2
|
||||
|
||||
|
Install this mod: https://vborg.vbsupport.ru/showthread.php?p=2141404
The go to your Admin CP -> Products & Plugins -> Plugin Manager Edit the plugin called: Register Group Delete all the PHP code and replace it with the following (copy and paste it in): Code:
global $vbulletin;
if ($vbulletin->options['reg_group_enable'])
{
if ($vbulletin->options['reg_group'])
{
if (preg_match("/mil$/" , $vbulletin->userinfo['email']))
{
$newuser = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user
ORDER BY userid DESC");
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user
SET usergroupid = '" . $vbulletin->options['reg_group'] . "'
WHERE userid = '".$newuser['userid']."' ");
}
}
}
|
|
#3
|
|||
|
|||
|
You are amazing! This will be great. If they change their email address afterwards to a .com will they still be registered under the same .mil email address? I'd like to verify they're in the military, but allow them to transfer their email address back home.
|
|
#4
|
||||
|
||||
|
Once they register you or they can change their email and their group will stay the same.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|