Query if binding is possible (QueryCanBind)
Query if binding is possible, currently only supports self-built accounts.
According to whether the account is registered, the member variables of the callback data AccountResult will be as follows:
- Account not registered:
can_bindreturnstrueis_registerreturnsfalse.
- Account already registered:
is_registerreturns true.- If logged in and bound (with OpenID),
can_bindreturnsfalse. - If not logged in and bound (without OpenID),
can_bindreturnstrue.
Function Definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool QueryCanBind(
const int32 ChannelId,
const int32 AccountPlatType,
const FString Account,
const FString PhoneAreaCode,
const FString ExtraJson = "{}");
Parameter Details
| Name | Type | Explanation |
|---|---|---|
| ChannelId | int32 | Self-built account channel ID ACCOUNT_PLAT_TYPE assigned by the Player Network Console |
| AccountPlatType | int32 | Platform type ID corresponding to the channel |
| Account | FString | Account Support for email and phone number |
| PhoneAreaCode | FString | Phone area code For example, "86" for China, if registering with email, the field is empty |
| ExtraJson | FString | Additional information |
Return value
Callback ID is kMethodIDAuthLaunchAccountUI.
Observers
The callback interface is AuthAccountResultObserver.The callback data structure is AccountResult.
Callback ID is kMethodIDAuthQueryCanBind.
Code sample
bool support = UINTLSDKAPI::QueryCanBind(11, 3, "youremail@sample.com", "");