diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index bd80b8fa2a..136b8cbe00 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -222,6 +222,9 @@ Executed whenever a notification is pushed to a user. ``action:user.create`` ^^^^^^^^^^^^^^^^^^^^^ +``action:user.delete`` +^^^^^^^^^^^^^^^^^^^^^ + ``action:topic.delete`` ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/user/delete.js b/src/user/delete.js index 1daa737992..b955104b37 100644 --- a/src/user/delete.js +++ b/src/user/delete.js @@ -5,7 +5,8 @@ var async = require('async'), posts = require('../posts'), user = require('../user'), topics = require('../topics'), - groups = require('../groups'); + groups = require('../groups'), + plugins = require('../plugins'); module.exports = function(User) { @@ -111,6 +112,7 @@ module.exports = function(User) { return callback(err); } + plugins.fireHook('action:user.delete', uid); async.parallel([ function(next) { db.delete('followers:' + uid, next);