Browse Source

change findAll to countList

Seiya Tashiro 7 years ago
parent
commit
fc13ba327c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/server/models/user.js

+ 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;
     }