mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
Deprecated filter:user.delete hook
Please use static:user.delete instead.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user