mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
admin cleanup
removed unnecessary admin checks in src/admin/user then realized they are just one liners so moved them to src/socket.io.admin.js moved categories update to categories folder
This commit is contained in:
@@ -7,22 +7,18 @@ var async = require('async'),
|
||||
topics = require('./../topics'),
|
||||
categories = require('./../categories'),
|
||||
plugins = require('./../plugins'),
|
||||
events = require('./../events'),
|
||||
groups = require('./../groups');
|
||||
|
||||
|
||||
module.exports = function(User) {
|
||||
|
||||
User.delete = function(adminUid, uid, callback) {
|
||||
User.delete = function(uid, callback) {
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
deletePosts(uid, next);
|
||||
},
|
||||
function(next) {
|
||||
deleteTopics(uid, next);
|
||||
},
|
||||
function(next) {
|
||||
events.logAdminUserDelete(adminUid, uid, next);
|
||||
}
|
||||
], function(err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user