News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How can I set primary membergroup at the time of registration??? (SOLVED)

Started by True Knight, April 07, 2006, 05:58:12 PM

Previous topic - Next topic

True Knight

I want to be able to assign a primary membergroup at the time of registration. So far I am able to assignin an additional membergroup at the time of registration (with some help from some folks from this forum.)

Here's the code in Register.php

Quote// This is the code to put them in the appropriate gender membergroup change the values accordingly
   if ($row['gender'] == 1)
   {
      updateMemberData($row['ID_MEMBER'], array('additionalGroups' => "26"));
   }
   else
   {
      updateMemberData($row['ID_MEMBER'], array('additionalGroups' => "25"));
   }

How can I make the last one assign to Primary Member group 25 and not additionalGroups 25?

Thanks!
True Knight

True Knight

I resolved this issue after a lot of trial and error... Here's the solution!

// This is the code to put them in the appropriate gender membergroup change the values accordingly
if ($row['gender'] == 1)
{
updateMemberData($row['ID_MEMBER'], array('additionalGroups' => "26"));
}
else
{
updateMemberData($row['ID_MEMBER'], array('ID_GROUP' => "25"));
}


True Knight

Raceist? I'm not seperating by Race, I'm seperating by gender. I know you are only half-joking but the reason is...because my forum deals with sensitive support issues that are necessary to deal with seperatly...men must have a men only support area, and women must have a women only support area so that they can feel comfortable talking about certain issues that we deal with on my forum.

Thanks,
True Knight

Advertisement: