Jaxel
Well-known member
I have a function in a repository that is getting activated during an entity
The problem with this, is the following error:
How should I get around this?
_postSave()
.
Code:
$userGroupChange = \XF::service('XF:User\UserGroupChange');
$userGroupChange->addUserGroupChange($user->user_id, $unique_id, $groups);
The problem with this, is the following error:
LogicException: Attempted to set 'secondary_group_ids' while a save was pending without forceSet in src/XF/Mvc/Entity/Entity.php at line 575
How should I get around this?