mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-09 09:02:48 +01:00
fix: #13715, dont reduce hardcap if usersPerPage is < 50
This commit is contained in:
@@ -119,8 +119,7 @@ module.exports = function (User) {
|
||||
const min = query;
|
||||
const max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1);
|
||||
|
||||
const resultsPerPage = meta.config.userSearchResultsPerPage;
|
||||
hardCap = hardCap || resultsPerPage * 10;
|
||||
hardCap = hardCap || 500;
|
||||
|
||||
const data = await db.getSortedSetRangeByLex(`${searchBy}:sorted`, min, max, 0, hardCap);
|
||||
// const uids = data.map(data => data.split(':').pop());
|
||||
|
||||
Reference in New Issue
Block a user