Skip to main content

ResetPasswordWithOldPassword

[MSDK & Player Network SDK] Reset the password using the old password.

Supported Platform

Supports Android, iOS, Windows platform.

Function Definition

void ResetPasswordWithOldPassword(
string account,
string oldPassword,
string phoneAreaCode,
string newPassword,
string channel = "Self",
string langType = "en_US",
string extraJson = "{}");

Input Parameters

ParameterTypeDescription
accountstringAccount, which can be registered with an email address or phone number.
oldPasswordstringOld password
phoneAreaCodestringPhone area code, such as "86" for China. If you register an account with an email address, the field is left empty.
newPasswordstringNew password
For more information, see Password Rules.
extraJsonstringExtended information
channelstringChannel
Currently not in use, pass ""
langTypestringLanguage type
Currently not in use, pass ""

Callback Processing

The callback processing API is GUAAccountResultObservers. The callback data structure is GUAAccountResult.

The callback event is AccountEvents. The callback methodID is GUA_ACCOUNT_RESET_PASSWORD.

Code Sample

UnionAdapterAPI.GetAccountService().ResetPasswordWithOldPassword("account", "oldPassword", "86", "newPassword");