Hook when user's group has been changed
-
Fellows, is there any way to track users' group changes?
I wanna execute some third party code, right after the moment, when an administrator has added/removed a user to/from a group via admin panel.
Unfortunately, I found nothing similar on that page https://github.com/NodeBB/NodeBB/wiki/Plugin-HooksIf it not possible without changing the core, please tell me something useful anyway.
Any advice will be appreciated. -
Sorry for bothering guys, I found it in the source code.
There are two hooks already:
action:group.join action:group.leave
Both of them takes only one argument:
{ groupName: groupName, uid: uid }
join: https://github.com/NodeBB/NodeBB/blob/master/src/groups.js#L633-L675
leave: https://github.com/NodeBB/NodeBB/blob/master/src/groups.js#L711-L742Exactly what I'm looking for!
Edit:
action:groups.*
hooks in the source code were renamed to
action:group.*