diff --git a/src/controllers/admin/dashboard.js b/src/controllers/admin/dashboard.js index e5f89d684f..8ecff0b26e 100644 --- a/src/controllers/admin/dashboard.js +++ b/src/controllers/admin/dashboard.js @@ -262,12 +262,17 @@ dashboardController.getUsers = async (req, res) => { }; // List of recently registered users + const end = parseInt(req.query.until, 10) || Date.now(); + const start = end - (1000 * 60 * 60 * (req.query.units === 'days' ? 24 : 1) * (req.query.count || (req.query.units === 'days' ? 30 : 24))); + const uids = await db.getSortedSetRangeByScore('users:joindate', 0, 500, start, end); + const users = await user.getUsersFields(uids, ['uid', 'username', 'email', 'joindate']); res.render('admin/dashboard/users', { set: 'registrations', query: req.query, stats, summary, + users, }); }; diff --git a/src/views/admin/dashboard/users.tpl b/src/views/admin/dashboard/users.tpl index 64e7c1cc61..d9fafa5ee7 100644 --- a/src/views/admin/dashboard/users.tpl +++ b/src/views/admin/dashboard/users.tpl @@ -1,6 +1,23 @@ -
-
- - -
+
+ + + + + + + + + + + + {{{ each users }}} + + + + + + + {{{ end }}} + +
[[admin/manage/users:users.uid]][[admin/manage/users:users.username]][[admin/manage/users:users.email]][[admin/manage/users:users.joined]]
{../uid}{../username}{../email}
\ No newline at end of file