REST.Backend.EMSApi.TEMSClientAPI.QueryUserName
Delphi
function QueryUserName(const AUserName: string; out AUser: TUser;
const AJSON: TJSONArray; AProc: TQueryUserNameProc): Boolean; overload;
function QueryUserName(const AUserName: string; AProc: TQueryUserNameProc): Boolean; overload;
function QueryUserName(const AUserName: string; out AUser: TUser;
const AJSON: TJSONArray = nil): Boolean; overload;
C++
bool __fastcall QueryUserName(const System::UnicodeString AUserName, /* out */ TUser &AUser, System::Json::TJSONArray* const AJSON, _di_TQueryUserNameProc AProc)/* overload */;
bool __fastcall QueryUserName(const System::UnicodeString AUserName, _di_TQueryUserNameProc AProc)/* overload */;
bool __fastcall QueryUserName(const System::UnicodeString AUserName, /* 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
Queries the EMS server for the data of a user with the specified username and returns True if a user with the specified username exists in the EMS server or False otherwise.
To handle the received information, you may provide the following parameters:
AUseris an instance of TUser that RetrieveUser fills with the received user data.AJSONis an instance of TJSONArray that RetrieveUser fills with the received user data in JSON format.AProcis a procedure of type TQueryUserNameProc. RetrieveUser 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).
- Note: QueryUserName supports different combinations of these parameters, see the signature of the function above.
Exceptions
| Exception | Message | Description |
|---|---|---|
|
MasterSecret required |
Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string. | |
|
One user expected |
The EMS server returned more than one user for the specified username. | |
|
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.RetrieveCurrentUser
- REST.Backend.EMSApi.TEMSClientAPI.UpdateUser
- 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