Probably it isn't what you expected to get as an answer
https://github.com/NodeBB/NodeBB/wiki/Plugin-Hooks#actionuserset
https://github.com/NodeBB/NodeBB/blob/8f5bf1a7edc991f7b40c3f8520cec87b8b10b8f8/src/user.js#L159-L196