1

I've been looking at Joomla 3.x plugin events to determine if a particular event gets triggered when a user's usergroup is changed. Update-specifically I've been trying to detect an event that is triggered whenever a user is added to or removed from a group. I've not found anything that specific, but it seems like onUserAfterSave will fire. I tried to test this using a custom plugin, but when I edited the usergroups using the usermanager in the backend, I was unable to see anything.

  • Can anyone confirm that onUserAfterSave will fire on usergroup change?
  • Does anyone know of any other events that would fire on usergroup change?
1

Not sure if you want event for changing user's usergroup (on user edit view) or just event which is triggered on editing specific usergroup.

Changing user will trigger (documented)

  • onUserBeforeSave
  • onUserAfterSave

Changing usergroup will trigger (undocumented, see source code)

  • onUserBeforeSaveGroup
  • onUserAfterSaveGroup
  • onUserAfterSave seems to do what I want (I've gotten it to work now). I was a bit confused about the use of onUserAfterSaveGroup, but your answer at joomla.stackexchange.com/a/14829/115 clarified it for me. Thanks Rene :) – TryHarder Dec 31 '15 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.