diff --git a/apps/meteor/app/models/server/models/Users.js b/apps/meteor/app/models/server/models/Users.js index 725f90a0be2f..fdbaa5c38a91 100644 --- a/apps/meteor/app/models/server/models/Users.js +++ b/apps/meteor/app/models/server/models/Users.js @@ -999,6 +999,16 @@ export class Users extends Base { ); } + findActiveFederated(options = {}) { + return this.find( + { + active: true, + federated: true, + }, + options, + ); + } + getSAMLByIdAndSAMLProvider(_id, provider) { return this.findOne( { @@ -1601,7 +1611,7 @@ Find users to send a message by email if: } getActiveLocalUserCount() { - return this.findActive().count() - this.findActiveRemote().count(); + return this.findActive().count() - this.findActiveRemote().count() - this.findActiveFederated().count(); } getActiveLocalGuestCount(idExceptions = []) {