added adminitstrator value to userData for admin users page

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

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

Loading…
Cancel
Save