Reset password using the old password (ResetPasswordWithOldPassword)
[MSDK & Player Network SDK] Reset your password using your old password.
Supported platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void ResetPasswordWithOldPassword(
string account,
string oldPassword,
string phoneAreaCode,
string newPassword,
string channel = "Self",
string langType = "en_US",
string extraJson = "{}");
static void ResetPasswordWithOldPassword(
const std::string &account,
const std::string &old_password,
const std::string &phone_area_code,
const std::string &new_password,
const std::string &channel = "Self",
const std::string &lang_type = "en_US",
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| account | string | Account can be registered with email and phone number |
| oldPassword | string | Old password |
| phoneAreaCode | string | Phone area code example "86" for China, leave empty if the account is an email. |
| newPassword | string | New password For more information, see Password Rules . |
| extraJson | string | Extended information |
| channel | string | Channel Player Network SDK does not currently use this, can be set to "" |
| langType | string | Language type Currently not used by Player Network SDK, can be "" |
| Parameters | Type | Description |
|---|---|---|
| account | std::string | Account can be registered with email and phone number |
| old_password | std::string | Old password |
| phone_area_code | std::string | Phone area code example "86" for China, leave empty if the account is an email. |
| new_password | std::string | New password For more information, see Password Rules . |
| channel | std::string | Channel Currently not used by Player Network SDK, can be set to "" |
| lang_type | std::string | Language type Currently not used by Player Network SDK, can be "" |
| extra_json | std::string | Extended information |
Callback Handling
The callback handler interface is GUAAccountResultObservers.The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents. The callback ID is GUA_ACCOUNT_RESET_PASSWORD.
The callback event is OnAccountResultNotify. The callback ID is kMethodIDAccountResetPassword.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ResetPasswordWithOldPassword("account", "oldPassword", "86", "newPassword");
GUA_NAMESPACE::GUAAccountService::ResetPasswordWithOldPassword("Account", "OldPassword", "86", "NewPassword");