MyBB Community Forums

Full Version: Usergroups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone tell me how to make 2 registered usergroups; where when a male signs up they are automatically placed into 1 registered usergroup, and when a female signs up they are automatically placed into the 2nd registered usergroup. Thanks very much for any helpSmile
You have to edit the registration page and add the input gender dropdown field as mandatory input.

Then capture the input during registration submit (do_register) set the usergroup.

Something like this:

Open member.php and find near line no 106:

else
	{
		$usergroup = 2;
	}

Modify as:

else if($mybb->input['sex'] == "1")
	{
		$usergroup = 2; // As Registered, Male
	}
else
	{
		$usergroup = 20; // As Registered, Female
	}

^^ remember, this is just an example, I've shown you how to do, not exactly what to do.