From 8624607a2b66509cefa675f3b6588966e6ae09b0 Mon Sep 17 00:00:00 2001 From: chengkun <chengkun@ishangstudy.com> Date: Fri, 30 May 2025 14:40:01 +0800 Subject: [PATCH] 提交 --- app/include/public.function.php | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/include/public.function.php b/app/include/public.function.php index 0c29416..1a3f722 100644 --- a/app/include/public.function.php +++ b/app/include/public.function.php @@ -16,6 +16,11 @@ } } +/** + * @desc 检测用户名格式 + * @param $str + * @return bool + */ function CheckRegUser($str) { if (!preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9\-@#.\$_!]+$/u", $str)) { return FALSE; @@ -24,6 +29,11 @@ } } +/** + * 检测电话号码 + * @param $str + * @return bool + */ function CheckTell($str) { if (preg_match("/^[0-9-]+?$/", $str) == 0) { return FALSE; @@ -1508,13 +1518,15 @@ return $str; } +/** + * @desc 判断短信功能是否开启 + * @param $config + * @return bool + */ function checkMsgOpen($config) { - - if ($config["sy_msg_appkey"] == "" || $config["sy_msg_appsecret"] == "" || $config['sy_msg_isopen'] != '1') { - + if ($config["sy_sms_secret_id"] == "" || $config["sy_sms_secret_key"] == "" || $config['sy_sms_sdk_app_id'] == '') { return FALSE; } else { - return TRUE; } } -- Gitblit v1.9.0