Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
Convergent Trading Posted October 30 Posted October 30 These functions are setters for changing the members primary and secondary groups. When used they do not clear the internal $this->_groups variable which is an internal class cache of the groups the member is in, so subsequent calls which use that cache, such as inGroup() return stale data. I'm experiencing this issue when running code in the MemberSync onProfileUpdate extension. During that extension i'm trying to sync some of the members groups to a 3rd party system but my calls to inGroup() are giving the pre-save data rather than the post-save data. Simply clearing the internal cache variable within set_member_group_id & set_mgroup_others will fix this. $this->_groups = NULL;
Marc Posted Wednesday at 12:13 PM Posted Wednesday at 12:13 PM Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
Recommended Posts