serverinfo
serverinfo copied to clipboard
num_users counts the number of users that have ever existed, but should be the total number of enabled users
num_users counts the number of users who have ever been active on a nextcloud instance - even after they have been deactivated or even deleted:
$query->selectAlias($query->createFunction('COUNT(*)'), 'num_entries')
->from('preferences')
->where($query->expr()->eq('configkey', $query->createNamedParameter('lastLogin')));
In terms of monitoring user activities, this value makes no sense at all: I want to see how many users out of my total number of enabled users were active in the last 5 minutes / 60 minutes / 24 hours.