2
0
Эх сурвалжийг харах

change findAll to countList

Seiya Tashiro 7 жил өмнө
parent
commit
fc13ba327c

+ 1 - 1
src/server/models/user.js

@@ -510,7 +510,7 @@ module.exports = function(crowi) {
     const User = this;
     const Config = crowi.model('Config');
     const userUpperLimit = Config.userUpperLimit(crowi);
-    const activeUsers = await User.findAllUsers({status: User.STATUS_ACTIVE});
+    const activeUsers = await User.countListByStatus(STATUS_ACTIVE);
     if (userUpperLimit !== 0 && userUpperLimit <= activeUsers.length) {
       isUserCountExceedsUpperLimit = true;
     }