How to get OutSystems Administrator name?

How to get OutSystems Administrator name?

  
Hello,

I want to get name and email address of OutSystems Administrator who manages the user espace and controls access to everything.

How do I get that from my application? Which entity to refer?

Thanks and Regards,
Suraj Borade
Solution
All users info can be retrieved via the users table (system)
To find the "administrator" (or multiple), I think the best is to join the users table via role and user_role. And then you should select all users having the desired role (role table).

Probably the best would be to create a site property to store the name of the role you need and use that in the query.
Using the name of the role will make it work on any environment (as long as the name of the role doesn't change). Using the id of the record is not a good option as it may very from one environment to another.
Solution
Hi Kurt,

Thanks for the reply. your solution worked for me.

Best Regards,
Suraj Borade
Personally I think you could better join User with User_Effective_Role in stead of User_Role. With User_Role you only support Roles that are bound to a User directly. With the use of User_Effective_Role you also support roles that are bound to a user through a group of roles.
Thanks Mark. I will have look at it.
Hi all,

Also keep in mind that the user_role table contains all roles (roles from deleted eSpaces are still active). If you have multiple 'administrators' join them with the eSpace table to check for which eSpace this administator is.

Kind regards,
Evert