From da24e342f2af7968ad5bf84d1b662cdbe6581bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sun, 30 Apr 2017 15:11:51 -0400 Subject: [PATCH] limit sessions displayed to 20 --- src/user/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/auth.js b/src/user/auth.js index 29a79f39c4..b288f857f5 100644 --- a/src/user/auth.js +++ b/src/user/auth.js @@ -65,7 +65,7 @@ module.exports = function (User) { } async.waterfall([ - async.apply(db.getSortedSetRevRange, 'uid:' + uid + ':sessions', 0, -1), + async.apply(db.getSortedSetRevRange, 'uid:' + uid + ':sessions', 0, 19), function (sids, next) { _sids = sids; async.map(sids, db.sessionStore.get.bind(db.sessionStore), next);