Index: branches/5.2.x/units/products/products_event_handler.php =================================================================== diff -u -N -r14986 -r15009 --- branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 14986) +++ branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15009) @@ -1,6 +1,6 @@ Conn->Query($sql, 'GroupId'); @@ -913,7 +913,7 @@ 'MembershipExpires' => $expire, ); - $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroup', 'REPLACE'); + $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations', 'REPLACE'); $sub_order =& $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord'); $sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0); @@ -1406,7 +1406,7 @@ $user_id = $this->Application->RecallVar('user_id'); $sql = 'SELECT PrimaryGroupId - FROM ' . TABLE_PREFIX . 'PortalUser + FROM ' . TABLE_PREFIX . 'Users WHERE PortalUserId = ' . $user_id; $primary_group_id = $this->Conn->GetOne($sql);