Dominyka Posted July 12, 2023 Share Posted July 12, 2023 What is a hook to catch when a Member is changing groups? \IPS\Member has set_member_group_id( $value ), but I need to know what group they are changing from and what the new group is. In the "Recent Activity" I have logs like "Expiring purchase "X" changed group from "Y" to"Z"." - I need to hook into this moment. How? Link to comment Share on other sites More sharing options...
Miss_B Posted July 12, 2023 Share Posted July 12, 2023 3 minutes ago, Dominyka said: What is a hook to catch when a Member is changing groups? \IPS\Member has set_member_group_id( $value ), but I need to know what group they are changing from and what the new group is. In the "Recent Activity" I have logs like "Expiring purchase "X" changed group from "Y" to"Z"." - I need to hook into this moment. How? You need to extent the \IPS\Member hook class. And the function that you need is called: public function save() Dominyka 1 Link to comment Share on other sites More sharing options...
Adriano Faria Posted July 12, 2023 Share Posted July 12, 2023 You can also create an app and add a MemberSync extension and add your stuff in onProfileUpdate method. Stuart Silvester, Dominyka and Miss_B 3 Link to comment Share on other sites More sharing options...
Dominyka Posted July 12, 2023 Author Share Posted July 12, 2023 Thank you! I was able to catch the new group ID. Miss_B 1 Link to comment Share on other sites More sharing options...
Recommended Posts