Sometimes it's nice to automatically notify other people when a user is activated, blocked or deleted (e.g. if you have a set of site admins that all want to know about it when another use has been approved, etc). It seems like in D6, the right solution to this is to use triggers and actions. However, I needed this for D5, so I thought I'd whip up a patch for it.

Comments

dww’s picture

Status: Active » Needs work
StatusFileSize
new7.42 KB

Here's an initial start at the functionality. It's mostly working. The only problem is that the same email body and subject is sent to the effected user and the admin(s). I can't decide if it should just have a hard-coded theme function for the text/subject in this case, or if there should actually be a 2 more settings for each of the 3 user actions for the site to customize the text that way. Seems like the admin UI is going to get way too busy, and the text for these notification emails seems less likely to change regularly, so perhaps a new set of theme functions would do the trick.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new14.79 KB

Added theme functions to control the subject/body for the admin emails. This is turning into a giant patch, but it seems like the best way to handle this...