保存验证码设置
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ConfigurationModel::securityUpdate |
| 所属业务 | 认证安全 |
| 来源模块/系统 | 用户模型 |
功能说明
保存验证码设置
调用示例
$captcha_client_register = 1;
$captcha_client_login = 1;
$captcha_client_login_error = 1;
$captcha_admin_login = 1;
$captcha_admin_login_error = 1;
$captcha_plugin = 'string';
$code_client_email_register = 1;
$captcha_client_verify = 1;
$captcha_client_update = 1;
$captcha_client_password_reset = 1;
$captcha_client_oauth = 1;
$captcha_client_security_verify = 1;
$result = (new \app\common\model\ConfigurationModel())->securityUpdate($captcha_client_register, $captcha_client_login, $captcha_client_login_error, $captcha_admin_login, $captcha_admin_login_error, $captcha_plugin, $code_client_email_register, $captcha_client_verify, $captcha_client_update, $captcha_client_password_reset, $captcha_client_oauth, $captcha_client_security_verify);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
captcha_client_register | int | 否 | — | — | 客户注册图形验证码开关:1开启0关闭 |
captcha_client_login | int | 否 | — | — | 客户登录图形验证码开关:1开启0关闭 |
captcha_client_login_error | int | 否 | — | — | 客户登录失败图形验证码开关:1开启0关闭 |
captcha_admin_login | int | 否 | — | — | 管理员登录图形验证码开关:1开启0关闭 |
captcha_admin_login_error | int | 否 | — | — | 管理员登录失败图形验证码开关:1开启0关闭 |
captcha_plugin | string | 否 | — | — | 验证码插件(从/admin/v1/captcha_list接口获取) |
code_client_email_register | int | 否 | — | — | 邮箱注册数字验证码开关:1开启0关闭 |
captcha_client_verify | int | 否 | — | — | 验证手机/邮箱图形验证码开关:1开启0关闭 |
captcha_client_update | int | 否 | — | — | 修改手机/邮箱图形验证码开关:1开启0关闭 |
captcha_client_password_reset | int | 否 | — | — | 重置密码图形验证码开关:1开启0关闭 |
captcha_client_oauth | int | 否 | — | — | 三方登录图形验证码开关:1开启0关闭 |
captcha_client_security_verify | int | 否 | — | — | 安全校验图形验证码开关:1开启0关闭 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码,200成功,400失败 |
msg | string | 提示信息 |
正常返回
{
"status": 1,
"msg": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |