I need to know the user id and groups of the currently logged-in user in a client application of RAD server to do some further logic. But I couldn't find anything about that in the documentation. Can anyone please share any ideas? Thanks.
How to get the user id and groups of the currently logged-in user in a client application of RAD Server in Delphi?
491 Views Asked by MW3226 At
2
There are 2 best solutions below
2
On
One way to get information about users/groups from RAD Server is to use it's Administrative API, such as RetrieveUser. It's a lot, but reading up on the Internal API logic will go a long way for you. Good luck.
Note: Use the TEMSClientAPI, the TBackendUsers or the TBackendAuth components to sign up, log in, retrieve, update, or delete RAD Server Users information from your RAD Server Database
BackendAuth has a property called UserDetails.
To get the user user's username:
To get the current user's Security Identifier (SID)
Getting groups
(but be aware, some groups are simply labels, some are allow, some are deny)