ResetPasswordWithOldPassword
[MSDK & Player Network SDK] Reset the password using the old password.
Supported Platform
- 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
Parameter | Type | Description |
---|---|---|
account | string | Account, which can be registered with an email address or phone number. |
oldPassword | string | Old password |
phoneAreaCode | string | Phone area code, such as "86" for China. If you register an account with an email address, the field is left empty. |
newPassword | string | New password For more information, see Password Rules. |
extraJson | string | Extended information |
channel | string | Channel Currently not in use, pass "" |
langType | string | Language type Currently not in use, pass "" |
Parameter | Type | Description |
---|---|---|
account | std::string | Account, which can be registered with an email address or phone number. |
old_password | std::string | Old password |
phone_area_code | std::string | Phone area code, such as "86" for China. If you register an account with an email address, the field is left empty. |
new_password | std::string | New password For more information, see Password Rules. |
channel | std::string | Channel Currently not in use, pass "" |
lang_type | std::string | Language type Currently not in use, pass "" |
extra_json | std::string | Extended information |
Callback Processing
The callback processing API is GUAAccountResultObservers. The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents.
The callback methodID is GUA_ACCOUNT_RESET_PASSWORD
.
The callback event is OnAccountResultNotify.
The callback methodID is kMethodIDAccountResetPassword
.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ResetPasswordWithOldPassword("account", "oldPassword", "86", "newPassword");
GUA_NAMESPACE::GUAAccountService::ResetPasswordWithOldPassword("Account", "OldPassword", "86", "NewPassword");