mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 23:40:38 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
var async = require('async');
|
||||
var validator = require('validator');
|
||||
@@ -15,10 +15,10 @@ var usersController = {};
|
||||
var userFields = ['uid', 'username', 'userslug', 'email', 'postcount', 'joindate', 'banned',
|
||||
'reputation', 'picture', 'flags', 'lastonline', 'email:confirmed'];
|
||||
|
||||
usersController.search = function (req, res, next) {
|
||||
usersController.search = function (req, res) {
|
||||
res.render('admin/manage/users', {
|
||||
search_display: '',
|
||||
users: []
|
||||
users: [],
|
||||
});
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ usersController.registrationQueue = function (req, res, next) {
|
||||
user.getRegistrationQueue(start, stop, next);
|
||||
},
|
||||
customHeaders: function (next) {
|
||||
plugins.fireHook('filter:admin.registrationQueue.customHeaders', {headers: []}, next);
|
||||
plugins.fireHook('filter:admin.registrationQueue.customHeaders', { headers: [] }, next);
|
||||
},
|
||||
invites: function (next) {
|
||||
async.waterfall([
|
||||
@@ -97,14 +97,14 @@ usersController.registrationQueue = function (req, res, next) {
|
||||
invites.invitations = invites.invitations.map(function (email, i) {
|
||||
return {
|
||||
email: email,
|
||||
username: usernames[index][i] === '[[global:guest]]' ? '' : usernames[index][i]
|
||||
username: usernames[index][i] === '[[global:guest]]' ? '' : usernames[index][i],
|
||||
};
|
||||
});
|
||||
});
|
||||
next(null, invitations);
|
||||
}
|
||||
},
|
||||
], next);
|
||||
}
|
||||
},
|
||||
}, function (err, data) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
@@ -146,9 +146,9 @@ function getUsers(set, section, min, max, req, res, next) {
|
||||
},
|
||||
function (uids, next) {
|
||||
user.getUsersWithFields(uids, userFields, req.uid, next);
|
||||
}
|
||||
},
|
||||
], next);
|
||||
}
|
||||
},
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
@@ -161,7 +161,7 @@ function getUsers(set, section, min, max, req, res, next) {
|
||||
var data = {
|
||||
users: results.users,
|
||||
page: page,
|
||||
pageCount: Math.max(1, Math.ceil(results.count / resultsPerPage))
|
||||
pageCount: Math.max(1, Math.ceil(results.count / resultsPerPage)),
|
||||
};
|
||||
data[section] = true;
|
||||
render(req, res, data);
|
||||
@@ -185,7 +185,7 @@ usersController.getCSV = function (req, res, next) {
|
||||
events.log({
|
||||
type: 'getUsersCSV',
|
||||
uid: req.user.uid,
|
||||
ip: req.ip
|
||||
ip: req.ip,
|
||||
});
|
||||
|
||||
user.getUsersCSV(function (err, data) {
|
||||
|
||||
Reference in New Issue
Block a user