The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Default Usergroup Set by Profile Field On Registration
How would I get the following plugin code to work with 3.7?
Depending on the choice of the profile field, it places the user in a certain group. Example: I have a forum for bands and fans to register. One of the fields ask "Is this a band profile?" and the choices are Yes and No. If Yes is chosen, they are placed into the Band usergroup. If No is chosen, they are places in the registered users usergroup. I installed this plugin when I had 3.6.8 running and it was working. But the plugin is for 3.5. Now when people register, they get an error message saying it couldn't process their request. I'm almost sure this is what is messing the registration up and giving users errors. Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1" product="vbulletin"> <title>Put User In User Group Based on Field Value</title> <hookname>register_activate_process</hookname> <phpcode><![CDATA[// Get the value for field 5 $user = $db->query_first(" SELECT field44 FROM " . TABLE_PREFIX . "userfield WHERE userid = " . $vbulletin->userinfo['userid'] . " "); if ($user['field44'] == 'Yes') { $userdata->set('usergroupid', 9); }]]></phpcode> </plugin> </plugins> |
#2
|
|||
|
|||
Bump
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|