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