added adminitstrator value to userData for admin users page

v1.18.x
Baris Usakli 12 years ago
parent cb7768d095
commit d40a6a5c3f

@ -317,17 +317,23 @@ var utils = require('./../public/src/utils.js'),
return callback(err, null); return callback(err, null);
} }
function iterator(uid, callback) { Groups.getGidFromName('Administrators', function(err, gid) {
User.getUserData(uid, function(err, userData) {
if (userData) { function iterator(uid, callback) {
data.push(userData); User.getUserData(uid, function(err, userData) {
} Groups.isMember(uid, gid, function(err, isMember) {
callback(null); if (userData) {
}); userData.administrator = isMember;
} data.push(userData);
}
callback(null);
});
});
}
async.eachSeries(uids, iterator, function(err) { async.eachSeries(uids, iterator, function(err) {
callback(err, data); callback(err, data);
});
}); });
}); });
} }

Loading…
Cancel
Save