New user event requests

Permalink
I'm working on a project that needs to automate emails to users when they're activated/deactivated. I found a couple of posts on this and the main one suggests adding/removing them from a group based on their activation status. That "works", but seems a little hacky to me, since that's basically what the uIsActivate column is there for in the first place. I think the best solution is to add events for user activation/deactivation.
I've gone ahead and overridden my site's models/userinfo.php file and added the events. I feel pretty strongly that all the "setter" methods should fire events (here and on other attributekeycategories, e.g. files and pages).
Here are the UserInfo methods that I think need events added:

sendPrivateMessage
setAttribute
clearAttribute
reindex
updateGroups
markValidated
activate
deactivate
resetUserPassword

Making use of more events would really elevate the flexibility/extensibility of the system.

 
Mnkras replied on at Permalink Reply
Mnkras
I shall look into it ;) I added a bunch of new events already, (file, user, group)
Mnkras replied on at Permalink Reply
Mnkras
In the meantime,

open
concrete/models/userinfo.php

find

function activate() {

replace that and the deactivate function with:

http://pastebin.com/raw.php?i=44eyApJN...
Rushing replied on at Permalink Best Answer Reply
Thank'ye sir. That's exactly what I did and it worked like a charm.
Mnkras replied on at Permalink Reply
Mnkras
oops, hit the wrong button,

make a pull request!