|
|
|
@ -494,12 +494,18 @@ var fs = require('fs'),
|
|
|
|
|
var websockets = require('../socket.io');
|
|
|
|
|
|
|
|
|
|
user.getUsers('users:online', 0, 49, function (err, data) {
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
return item.status !== 'offline';
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function iterator(userData, next) {
|
|
|
|
|
var online = websockets.isUserOnline(userData.uid);
|
|
|
|
@ -522,6 +528,7 @@ var fs = require('fs'),
|
|
|
|
|
anonymousUserCount: anonymousUserCount,
|
|
|
|
|
show_anon: anonymousUserCount?'':'hide'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|