智简魔方文档

验证验证码

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\logic\SecurityVerifyLogic::verifyCode
所属业务认证安全
来源模块/系统安全验证逻辑类

功能说明

验证邮箱或手机验证码

调用示例

$clientId = 1;
$method = 'string';
$code = '123456';
$action = 'string';
$result = (new \app\common\logic\SecurityVerifyLogic())->verifyCode($clientId, $method, $code, $action);

参数

参数类型必填默认值校验规则说明
clientIdintrequired用户ID
methodstringrequired验证方式 email_code/phone_code
codestringrequired验证码
actionstringrequired验证动作 update_password/update_operate_password/host_transfer

返回值

返回项类型说明
返回值array

正常返回

{}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。