Skip to content

Node.js based forum software built for the modern web

fix: #13715, dont reduce hardcap if usersPerPage is < 50

Barış Soner Uşaklıcb31e70e8a7b
diff --git a/src/user/search.js b/src/user/search.js
index 17df4b68f1..7edfeb73ca 100644
--- a/src/user/search.js
+++ b/src/user/search.js
@@ -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());