Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 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 October 30 Posted October 30 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. Convergent Trading 1
Recommended Posts