mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 07:26:13 +02:00
only return minimal info for pending and invited users
This commit is contained in:
@@ -6,13 +6,21 @@ var db = require('../database');
|
||||
var user = require('../user');
|
||||
|
||||
module.exports = function (Groups) {
|
||||
Groups.getUsersFromSet = function (set, callback) {
|
||||
Groups.getUsersFromSet = function (set, fields, callback) {
|
||||
if (typeof fields === 'function') {
|
||||
callback = fields;
|
||||
fields = null;
|
||||
}
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
db.getSetMembers(set, next);
|
||||
},
|
||||
function (uids, next) {
|
||||
user.getUsersData(uids, next);
|
||||
if (fields) {
|
||||
user.getUsersFields(uids, fields, callback);
|
||||
} else {
|
||||
user.getUsersData(uids, next);
|
||||
}
|
||||
},
|
||||
], callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user