I’m trying to write a plugin that fires after a webuser is saved in the manager. I’ve attached my plugin to OnWebSaveUser and it works as expected. However, I have different webuser groups and I’d like my plugin to respond differently depending on the webuser group to which the webuser belongs. In save_web_user.processor.php I notice that the code that invokes the OnWebSaveUser event occurs before the code that saves the webuser groups to which the webuser belongs. Perhaps I am not understanding the the model here, but doesn’t it make sense for the OnWebSaveUser event to fire after the webuser group information is saved in the db? Is webgroup membership information not conceptually considered part of the webuser?
In any event, what is the best way to get the effect I want? I need to somehow get the webgroup membership information for a webuser at the time the webuser is created so I can react appropriately. My dilemma is that the information is not passed as part of the event call and not yet saved in the database.
Any suggestions as to how I can do this without changing save_web_user.processor.php? I realize I could simply move the code that invokes the event to after the code that saves the group membership information but I’d like to avoid changing core files if possible.
-
☆ A M B ☆
- 24,524 Posts
Is the $_POST[’user_groups’] still available to you?