edoc Knowledge Base
Breadcrumbs

How do I determine the number of active and licensed users in edoc contract?

Component

edoc contract

Version

24.12.1

Created on

Last modified on

No Workflow Applied

Review status

No Workflow Applied

KB article number

1096646865

Summary

In this KB article, you will learn how to determine the number of active users in edoc contract. You can also use an SQL query to obtain a list of users who are members of the active groups.

In this way you can determine, for example, whether you have enough user licenses for edoc contract in use.

Important requirements

  • You must have read access to the database of the edoc contract instance.

Solution

To determine the number of active users, you must perform an SQL query.

Connect to the edoc contract database in the integrated MySQL instance of edoc automate.

To establish a connection to the edoc contract database, you can use the supplied phpMyAdmin instance, for example, which can be accessed at https://<server>/pma. You can determine the database used via the data sources in edoc automate.

You can use the following SQL queries:

SQL
SELECT COUNT(*) 
FROM users u 
JOIN group_users gu ON gu.user_id = u.id
JOIN groups g ON g.id = gu.group_id
WHERE active = 1;

You can obtain a list of users of active groups that has been cleared of duplicates with the following query:

SQL
SELECT DISTINCT u.username, u.firstname, u.lastname,u.email 
FROM users u JOIN group_users gu ON gu.user_id = u.id  
JOIN groups g ON g.id = gu.group_id
WHERE active = 1;