@baris said in All users' status is invisible:
The script @pitaj posted will set lastonline field of the user to Date.now if you don't want that remove it from the data object above.
unfortunately we had to remove the other lastonline line(s) in setUsersOnline()too.
function setUsersOnline(callback) {
var batch = require('./src/batch');
batch.processSortedSet('users:joindate', function (uids, next) {
// const lastonline = Date.now();
const data = {
// lastonline,
status: 'online',
};
async.parallel([
cb => async.each(uids, (uid, next) => {
db.setObject(`user:${uid}`, data, next);
}, cb),
// cb => db.sortedSetAdd('users:online', uids.map(() => lastonline), uids, cb),
], next);
}, callback);
}
no idea why lastonline is manipulated by the script anyway. to force a re-login to see it taking effect the forum was rebuild and restarted after running the script.