Quote by machinari: will PLG_groupChanged() not do the trick?
I don't think so, from reading the code, it appears it is called if you make a specific change to a group, not necessarily when a user is added to a group. For example, looking at the GL 1.4 code for user.php, all the user's group assignments are deleted, then rebuilt from the selected groups in the form. No calls to PLG_groupChanged() are made at that point.
If you edit the group, any group attribute changes will trigger a call to PLG_groupChanged(), but editing the group membership does not trigger a PLG_groupChanged() call.
I think the best approach would be to make a PLG_userInfoChanged() call in user.php, this way you can pickup both profile changes and group assignment changes. The only problem is that this call would have to be made without really knowing if anything actually changed since there is no method right now to determine if group assignments changed in the user edit.
Actually, you got me thinking. Just adding a call to PLG_userInfoChanged() in users.php will not accomplish the goal. Since users can also be added in group.php in the editusers() function, there would have to be a call made there for each user that is added/removed from a group. Probably too much overhead to implement that.
Maybe I should investigate using additional variables to the user profile to accomplish what I want.
Thanks!
Mark