Added a hook: action:user.delete

Allows plugins to access the uid of the user being deleted.
v1.18.x
dhingey 11 years ago
parent 5497b8c419
commit f7372ba8d5

@ -222,6 +222,9 @@ Executed whenever a notification is pushed to a user.
``action:user.create``
^^^^^^^^^^^^^^^^^^^^^
``action:user.delete``
^^^^^^^^^^^^^^^^^^^^^
``action:topic.delete``
^^^^^^^^^^^^^^^^^^^^^

@ -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);

Loading…
Cancel
Save