From 2a33991f0de40a38f3988664d078b3cf35e7ff2d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 25 Jan 2017 01:32:24 +0300 Subject: [PATCH] read usercount from global object --- src/controllers/admin/users.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controllers/admin/users.js b/src/controllers/admin/users.js index 0e67c7d64c..422de5b02d 100644 --- a/src/controllers/admin/users.js +++ b/src/controllers/admin/users.js @@ -128,7 +128,11 @@ function getUsers(set, section, min, max, req, res, next) { if (byScore) { db.sortedSetCount(set, min, max, next); } else { - db.sortedSetCard(set, next); + if (set === 'users:banned' || set === 'users:notvalidated') { + db.sortedSetCard(set, next); + } else { + db.getObjectField('global', 'userCount', next); + } } }, users: function (next) {