I was just sitting here watching some emails hit my inbox, which are triggered by a plugin on failed user logins. I thought it might be handy to have a plugin that lets me know when MODX blocks a user.
Then I realized that there are no system events or hooks associated with the act of blocking/unblocking a user.
It seems like there ought to be. Doesn't it?
From what I can tell, the actual blocking happens in /core/model/modx/processors/security/login.php, based on logic that involves the number of failed login attempts.
It would be nice to have a hook there, to write a plugin for.
Just off the top of my head, I'm guessing the hookset (did I just coin a new word?) would be
- OnBeforeUserBlock
- OnBeforeUserUnblock
- OnUserBlock
- OnUserUnblock
Thoughts? Anyone else think this would be a common-sense set of hooks to have available?