Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude federated and app users from active user count #16489

Merged
merged 3 commits into from
Feb 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/statistics/server/lib/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const statistics = {
}

// User statistics
statistics.totalUsers = Meteor.users.find().count();
statistics.activeUsers = Meteor.users.find({ active: true }).count();
statistics.totalUsers = Users.find().count();
statistics.activeUsers = Users.getActiveLocalUserCount();
Copy link
Contributor

@geekgonecrazy geekgonecrazy Feb 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so it excludes remote and app users right?

Can we add app users like we have with federated users below? Would be probably useful to know how many app users specifically like we have with remote users

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should add the count of app users

statistics.nonActiveUsers = statistics.totalUsers - statistics.activeUsers;
statistics.onlineUsers = Meteor.users.find({ statusConnection: 'online' }).count();
statistics.awayUsers = Meteor.users.find({ statusConnection: 'away' }).count();
Expand Down