PDA

View Full Version : Automatic user group assign at sign up


LittleBigDawg
12-05-2007, 10:41 PM
I posted this question in pre-sale forum and was told it can be done. So now I want to know how :)

I want to modify the registration form to ask a number of custom questions relating to my board's use and based on an anwer to one question I want the user to be automatically placed into one of 2 groups, one of them having more privileges.

Opserty
12-06-2007, 05:45 PM
1. Create the custom fields using the AdminCP and make sure they are required & displayed at registration
2. Create some custom PHP code in one of the registration Hook Locations I'm thinking 'register_addmember_process'. With some PHP code like:

if(...)
{
// X is a positive interger (the ID number of the usergroup)
$userdata->set('usergroupid', X);
}

Hopefully something like that should work, it will need a bit of testing but it shouldn't be too difficult. If you know PHP you could probably take a bash at it yourself, otheriwse you might need to hire someone to do it for you.

LittleBigDawg
12-06-2007, 07:02 PM
Unfortunetly I am not familiar with PHP. Very much a newbie to this. Thankfully I'm finding the entire set up process so far rather intuitive (Thank you VB guys!) but I'm not much of a computer person.