Hello, I am putting together a plugin that is intended to determine if a user is in a particular group, and then "do something" if they are.
The something in this instance is to add them via the foxycart api customer_save.
None of the system events appear to be triggered after a user is completely saved, and groups are updated. If I use "OnWebUserSave" for example, if I take a look at the web_user_attributes table when this is called, any updates made to their details have been commited to the table. However, if I look at group membership in web_groups, these still reflect the old settings.
So it looks like OnWebUSerSave happens after the user attributes are updated, but before the groups are updated. Is that right? If so, is there an event I can use to get the end-state of a user?
Thanks,
Paul
It looks like your analysis is correct. I don’t see any way to do it other than either hacking the save_web_user.processor.php code or actually checking the user group info in your plugin. $_POST[’user_groups’] should be available, but depending on your setup, you might have to check both $_POST[’user_groups’] and the current usergroup settings for that user in the DB. Maybe someone else will have a better idea.