Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: True Knight on April 05, 2006, 11:56:44 AM

Title: Assigning Primary Member Group at Registration (SOLVED)
Post by: True Knight on April 05, 2006, 11:56:44 AM
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
Title: Re: Assigning Primary Member Group at Registration
Post by: gamesmad on April 05, 2006, 12:26:03 PM
Im not sure of this, but it would make sense that the prefix would be something like "primaryGroups"...  Backup your file before you try it though.

Will
Title: Re: Assigning Primary Member Group at Registration
Post by: True Knight on April 05, 2006, 02:43:13 PM
Tried that...no good.

Any other suggestions?

TK
Title: Re: Assigning Primary Member Group at Registration
Post by: True Knight on April 06, 2006, 02:15:50 PM
Can anyone help me?
Title: Re: Assigning Primary Member Group at Registration
Post by: True Knight on April 07, 2006, 02:41:09 PM
Please...anyone?
Title: Re: Assigning Primary Member Group at Registration
Post by: True Knight on April 11, 2006, 10:13:23 AM
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"));
}