Article #25280: How to get a list of all users available on the database
Problem:
Determining all users available on the database
Solution:
In the database there is a system table called RDB$USER_PRIVILEGES
that could be queried to find the users who actually have permissions to
do anything.