The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How To Select Member Groups At Registration
Hi,
I have a vBulletin forum that requires users to register. At this point they receive the registration email & click on it's link. Then they must wait until they are Moderated in order to be allowed to post. I want to provide all users with certain forums. I.e. Communal forums for all. Depending on choices made at registration I wish to restrict access to other forums. E.g. Group A will have access to Forum A (but not Forums B & C) etc. Note: The 2 drop down lists for "Groups" both have the same contents - it just allows people to join 2 different groups out of the list). I have edited the "register" template to add in 2 drop down boxes. The choice being the groups the new registrant may be in. I have added a "plugin" to the "register_addmember_process" hook. Code:
if (is_numeric($_REQUEST['group1']) && ($_REQUEST['group1']>8)) { $membergroupids = $_REQUEST['group1']; } else { $membergroupids = ''; } if (is_numeric($_REQUEST['group2']) && ($_REQUEST['group2']>8)) { if ($membergroupids != $_REQUEST['group2']) { if ($membergroupids != '') { $membergroupids .= ','; } $membergroupids .= $_REQUEST['group2']; } } $userdata->set('membergroupids', $membergroupids); - The correct groups are entered into "membergroupids" in the DB. - "usergroupid" is still set to 3. However, the problem I have is that these members are now able to post even though they have not clicked on the email link or been moderated as members. Any ideas on how to either fix this solution or another approach to fixing this issue? I have proved this by adding a test user who is able to post. If I then remove the list of groups from "membergroupids" in the database, he is suddenly unable to post until he has clicked the link in the registration email & been moderated. TIA for any fixes / explanations / advice / etc. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|