Select Usergroup on registration
Well, here I will explain them to VBuletin 4.x, how to make the register can select a user group
I demonstrate using for Men and Women. 1_ Let User Profile Fields ---> Create new profile field ---> Single Selection Code:
Title: Select your Sex Description: Here you select your sex Options: Man Women Set Default: Yes, including a first option blank Field editable by the user: Just to register 2_ Open the file register.php (It is located in the folder that your forum dode) 3_ Search: PHP Code:
if ($vbulletin->options['verifyemail'])
PHP Code:
if ($vbulletin->options['verifyemail'])
NOTE: Here where is the X put the number of field of field of user profile created Aca says the number of the field: This line is the X PHP Code:
else if ($vbulletin->userinfo['fieldX'] == "Women")
Here tells you the ID number, which in this case the user group is called Women. This line is the W PHP Code:
$newusergroupid = W;
NOTE: With all this echo up here, provided they are registered and NO is selected confirmation email, provided that register and selects men are assigned the default user group that is the id number 2, and when women are chosen will select the user group that you placed the corresponding id. But should they be assigned the confirmation email option, you must also replace this in the register.php. (both steps are recommended in order to always be able or may not have the option to confirmation by email) 4_ Search: PHP Code:
if ($vbulletin->options['verifyemail'])
PHP Code:
if ($vbulletin->options['verifyemail'])
NOTE: Again, where is the X put the number of field of field of user profile created Aca says the number of the field: This line is the X PHP Code:
if ($vbulletin->userinfo['fieldX'] == "Mujer")
Credits: email http://www.dip-community.net/member.php?718-3xtr4 http://www.dip-community.net/register.php Sorry my english! Download No files for download. |
Similar Mods
Profile Enhancements Select Avatar On Registration | vBulletin 3.8 Add-ons |