忘记密码
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ClientModel::passwordReset |
| 所属业务 | 认证安全 |
| 来源模块/系统 | 用户模型 |
功能说明
忘记密码
调用示例
$type = 'phone';
$account = '18423467948';
$phone_code = '86';
$code = '1234';
$password = '123456';
$re_password = '1';
$result = (new \app\common\model\ClientModel())->passwordReset($type, $account, $phone_code, $code, $password, $re_password);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
type | string | 是 | phone | required | 注册类型:phone手机注册,email邮箱注册 |
account | string | 是 | 18423467948 | required | 手机号或邮箱 |
phone_code | string | 否 | 86 | — | 国家区号(注册类型为手机注册时需要传此参数) |
code | string | 是 | 1234 | required | 验证码 |
password | string | 是 | 123456 | required | 密码 |
re_password | string | 是 | 1 | required | 重复密码 |
返回值
未声明固定返回值。
正常返回
{}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |