Jump to content

Recommended Posts

Posted

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;

 

Posted

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.

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...