用旧密码重置密码(ResetPasswordWithOldPassword)
[MSDK & Player Network SDK] 通过旧密码重置新密码。
支持的平台
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.函数定义
- 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 = "{}");
入参说明
- Unity
- Unreal Engine
| 参数 | 类型 | 说明 |
|---|---|---|
| account | string | 账号,可用邮箱和手机号注册 |
| oldPassword | string | 旧密码 |
| phoneAreaCode | string | 手机区域码例如中国为"86",如果账号为邮箱则填空。 |
| newPassword | string | 新密码 更多信息,请参见 密码规则 。 |
| extraJson | string | 扩展信息 |
| channel | string | 渠道 Player Network SDK 目前没用到,可为"" |
| langType | string | 语言类型 Player Network SDK 目前没用到,可为"" |
| 参数 | 类型 | 说明 |
|---|---|---|
| account | std::string | 账号,可用邮箱和手机号注册 |
| old_password | std::string | 旧密码 |
| phone_area_code | std::string | 手机区域码例如中国为"86",如果账号为邮箱则填空。 |
| new_password | std::string | 新密码 更多信息,请参见 密码规则 。 |
| channel | std::string | 渠道 Player Network SDK 目前没用到,可为"" |
| lang_type | std::string | 语言类型 Player Network SDK 目前没用到,可为"" |
| extra_json | std::string | 扩展信息 |
回调处理
回调处理接口是 GUAAccountResultObservers。回调数据结构是 GUAAccountResult。
- Unity
- Unreal Engine
回调事件是 AccountEvents 。 回调 ID 是 GUA_ACCOUNT_RESET_PASSWORD。
回调事件是 OnAccountResultNotify 。 回调 ID 是 kMethodIDAccountResetPassword。
代码示例
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ResetPasswordWithOldPassword("account", "oldPassword", "86", "newPassword");
GUA_NAMESPACE::GUAAccountService::ResetPasswordWithOldPassword("Account", "OldPassword", "86", "NewPassword");