Bug #7998
closedFields: field values do not get removed on plan deactivation if a usergroup has been assigned
Description
If a plan assigns a usergroup and the plan is configured to set a field value, but also configured to remove the field value on plan deactivation then removal of the field value fails. This is only the case if the plan is assigning a usergroup. More than likely the double ->store() (1 for the field value change and 1 for the usergroup change) is the cause.
Updated by krileon over 4 years ago
checkUserSubscriptions calls _adjustUserAclBlock to change ACL and block state. It is not sent a reference user object. It also does not cause a new UserTable() with ->load call to reload the user object. This means any changes made to a user object during integrations will be lost when the ACL and block state changes happen. It is using getUserDataInstance though, which does cache user objects for reuse so as long as the entire chain is using a user object from that cache it should work as expected.
Updated by krileon over 4 years ago
Issue is entirely in CBSubs Fields integration. The _addField and _removeField functions do not expect reference user objects and the _removeField function is not correctly setting the reverted value into the user object.
Updated by krileon over 4 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Fixed in MR !190