REST.Backend.EMSApi.TEMSClientAPI.RetrieveCurrentUser
Delphi
function RetrieveCurrentUser(AProc: TRetrieveUserProc): Boolean; overload;
function RetrieveCurrentUser(out AUser: TUser; const AJSON: TJSONArray = nil): Boolean; overload;
C++
bool __fastcall RetrieveCurrentUser(_di_TRetrieveUserProc AProc)/* overload */;
bool __fastcall RetrieveCurrentUser(/* out */ TUser &AUser, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
Description
Requests your user information from the EMS server and returns True
if it receives the information successfully or False
otherwise.
To handle the received information, you must provide either of the following:
- An instance of TUser (
AUser
orAFoundUser
). RetrieveCurrentUser fills the specified object with the received user data.You may optionally provide a third argument, an instance of TJSONArray (
AJSON
), so that RetrieveCurrentUser fills that object with the received user data in JSON format. - A procedure of type TRetrieveUserProc (
AProc
). RetrieveCurrentUser calls your procedure and provides the received user data both as an instance of TUser (first argument) and as an instance of TJSONArray (second argument).
Exceptions
Exception | Message | Description |
---|---|---|
MasterSecret required |
Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string. | |
Session token required |
Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string. |
See Also
- REST.Backend.EMSApi.TEMSClientAPI.AddUser
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUser
- REST.Backend.EMSApi.TEMSClientAPI.UpdateUser
- REST.Backend.EMSApi.TEMSClientAPI.QueryUserName
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUsersNames
- REST.Backend.EMSApi.TEMSClientAPI.RetrieveUsersFields
- REST.Backend.EMSApi.TEMSClientAPI.QueryUsers
- REST.Backend.EMSApi.TEMSClientAPI.SignupUser
- REST.Backend.EMSApi.TEMSClientAPI.LoginUser
- REST.Backend.EMSApi.TEMSClientAPI.LogoutUser
- REST.Backend.EMSApi.TEMSClientAPI.DeleteUser