From 5c4e98823236187e6a769632e10f330ec43ecf51 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 15 May 2015 14:46:37 -0400 Subject: [PATCH] fix user.csv data --- src/upgrade.js | 4 ++-- src/user/admin.js | 7 +++++-- src/views/admin/manage/users.tpl | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/upgrade.js b/src/upgrade.js index 686c7a1f88..47fd8badc0 100644 --- a/src/upgrade.js +++ b/src/upgrade.js @@ -1050,13 +1050,13 @@ Upgrade.upgrade = function(callback) { updatesMade = true; winston.info('[2015/05/11] Updating widgets to tjs 0.2x'); - require('./widgets/admin').get(function(err, data) { + require('./widgets/admin').get(function(err, data) { async.each(data.areas, function(area, next) { require('./widgets').getArea(area.template, area.location, function(err, widgets) { if (err) { return next(err); } - + for (var w in widgets) { if (widgets.hasOwnProperty(w)) { widgets[w].data.container = widgets[w].data.container diff --git a/src/user/admin.js b/src/user/admin.js index 615a765f6a..2ffbad9512 100644 --- a/src/user/admin.js +++ b/src/user/admin.js @@ -32,9 +32,12 @@ module.exports = function(User) { async.waterfall([ function(next) { - db.getSortedSetRange('username:uid', 0, -1, next); + db.getSortedSetRangeWithScores('username:uid', 0, -1, next); }, - function(uids, next) { + function(users, next) { + var uids = users.map(function(user) { + return user.score; + }); User.getMultipleUserFields(uids, ['uid', 'email', 'username'], next); }, function(usersData, next) { diff --git a/src/views/admin/manage/users.tpl b/src/views/admin/manage/users.tpl index 37b993dba7..c5762f637e 100644 --- a/src/views/admin/manage/users.tpl +++ b/src/views/admin/manage/users.tpl @@ -129,7 +129,7 @@
Users Control Panel
- Download CSV + Download CSV