Merge branch 'master' of github.com:greynaert/NodeBB into greynaert-master

v1.18.x
Julian Lam 11 years ago
commit 054fd46924

@ -494,12 +494,18 @@ var fs = require('fs'),
var websockets = require('../socket.io'); var websockets = require('../socket.io');
user.getUsers('users:online', 0, 49, function (err, data) { user.getUsers('users:online', 0, 49, function (err, data) {
var onlineUsers = []; var onlineUsers = [];
uid = 0;
if (req.user) {
uid = req.user.uid;
}
user.isAdministrator(uid, function (err, isAdministrator) {
if (true != isAdministrator) {
data = data.filter(function(item) { data = data.filter(function(item) {
return item.status !== 'offline'; return item.status !== 'offline';
}); });
}
function iterator(userData, next) { function iterator(userData, next) {
var online = websockets.isUserOnline(userData.uid); var online = websockets.isUserOnline(userData.uid);
@ -522,6 +528,7 @@ var fs = require('fs'),
anonymousUserCount: anonymousUserCount, anonymousUserCount: anonymousUserCount,
show_anon: anonymousUserCount?'':'hide' show_anon: anonymousUserCount?'':'hide'
}); });
});
}); });
}); });
} }

Loading…
Cancel
Save