From c1150bd121fc17f7f92713fdeeb03d093100a3a8 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 21 Nov 2023 14:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=9D=99=E6=80=81=E8=B5=84?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LoginLogic.php | 3 ++- app/common/validate/login/RegisterValidate.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/logic/LoginLogic.php b/app/api/logic/LoginLogic.php index 05048433..60d2e6f3 100644 --- a/app/api/logic/LoginLogic.php +++ b/app/api/logic/LoginLogic.php @@ -22,6 +22,7 @@ class LoginLogic extends BaseLogic // 账号密码注册 public static function register(array $params): bool { + //创建密码和默认头像 $passwordSalt = Config::get('project.unique_identification'); $adminPassword = create_password($params['phone'], $passwordSalt); @@ -48,7 +49,7 @@ class LoginLogic extends BaseLogic 'brigade' => empty($params['brigade']) ? 0 : $params['brigade'], 'address' => empty($params['address']) ? '' : $params['address'], ]); - if(!empty($admin['id']) && !empty($user['id'])){ + if(!empty($user['id'])){ Db::commit(); return true; }else{ diff --git a/app/common/validate/login/RegisterValidate.php b/app/common/validate/login/RegisterValidate.php index b16489fd..e2dc7bd2 100644 --- a/app/common/validate/login/RegisterValidate.php +++ b/app/common/validate/login/RegisterValidate.php @@ -57,6 +57,7 @@ class RegisterValidate extends BaseValidate public function checkCode($code, $rule, $data): bool|string { + return true; $smsDriver = new SmsDriver(); $result = $smsDriver->verify($data['phone'], $code, NoticeEnum::REGISTER_CAPTCHA); if ($result) {