Deprecated filter:user.delete hook

Please use static:user.delete instead.
This commit is contained in:
Julian Lam
2015-08-25 17:48:18 -04:00
parent 6c44db9a0c
commit a1d5132777
2 changed files with 76 additions and 60 deletions

View File

@@ -4,6 +4,9 @@ var winston = require('winston'),
async = require('async');
module.exports = function(Plugins) {
Plugins.deprecatedHooks = [
'filter:user.delete'
];
/*
`data` is an object consisting of (* is required):
@@ -23,6 +26,10 @@ module.exports = function(Plugins) {
var method;
if (Plugins.deprecatedHooks.indexOf(data.hook) !== -1) {
winston.warn('[plugins/' + id + '] Hook `' + data.hook + '` is deprecated, please use an alternative');
}
if (data.hook && data.method) {
data.id = id;
if (!data.priority) {