News:

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

Main Menu

Assigning Primary Member Group at Registration (SOLVED)

Started by True Knight, April 05, 2006, 11:56:44 AM

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

gamesmad

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
1 on 1 SMF Help - Want 1 on 1 SMF Help? Post in Help Wanted or drop me a message!

Go Charter! - Please consider becoming a charter member to support SMF development.

Please do not PM me with general questions, posting in the appropriate board will ensure everyone benefits from the advice given.

True Knight

Tried that...no good.

Any other suggestions?

TK



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"));
}

Advertisement: