Check Whether a Username Can Be Used to Register an Account (QueryUserNameStatus) [Player Network SDK Only]
[Player Network SDK only] Check if the username can be used to register an account.If the username is available, the returned value of IsUserNameAvailable is 1; otherwise, it is 0.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void QueryUserNameStatus(string userName);
static void QueryUserNameStatus(const std::string &user_name);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| userName | string | username |
| Parameters | Type | Description |
|---|---|---|
| user_name | std::string | username |
Callback Handling
The callback processing interface is GUAAccountResultObservers.The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents. The callback ID is GUA_ACCOUNT_QUERY_USER_NAME_STATUS.
The callback event is OnAccountResultNotify. The callback ID is kMethodIDAccountQueryUserNameStatus.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().QueryUserNameStatus("username");
GUA_NAMESPACE::GUAAccountService::QueryUserNameStatus("username");