diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 4029d6a5..12ffe41e 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -69,7 +69,7 @@ php xcat createAdmin mariadb -h DB_HOST -P DB_PORT -u DB_USER -p BUSINESS_DB < /home/virt-cloud/web/sql/user_profile.sql ``` -该增量文件只为当前分支的测试环境补充姓、名、手机号和地址字段,不读取或迁移已退役系统的数据。已有用户默认保留空资料,可登录后在“账户设置 → 账户信息”补齐;新注册用户必须完整填写。 +该增量文件只为当前分支的测试环境补充姓、名、手机号和地址字段,不读取或迁移已退役系统的数据。注册流程不采集这些资料;新用户和已有用户均可登录后在“账户设置 → 账户信息”中补充。 若实例是在缺少 PHP 模板展示快照的早期 Go Agent 版本中创建,更新面板代码后先执行只读检查,再显式应用元数据修复: diff --git a/web/app/Controllers/AuthController.php b/web/app/Controllers/AuthController.php index 02037226..1d78157b 100644 --- a/web/app/Controllers/AuthController.php +++ b/web/app/Controllers/AuthController.php @@ -21,7 +21,6 @@ use App\Services\RegistrationIpRestriction; use App\Services\RedisClient; use App\Services\ReferralService; use App\Services\TrustedLoginDeviceService; -use App\Services\UserProfileService; use App\Models\User; use App\Models\LoginIp; use App\Models\EmailVerify; @@ -880,15 +879,6 @@ class AuthController extends BaseController if (!Check::isEmailLegal($email) || strlen($email) > 254 || $name === '' || mb_strlen($name) > 128) { return $this->echoJson($response, ['ret' => 0, 'msg' => '请填写有效的用户名和邮箱']); } - $profileInput = []; - foreach (UserProfileService::FIELDS as $field) { - $profileInput[$field] = $read($field); - } - try { - $profile = UserProfileService::validate($profileInput); - } catch (\InvalidArgumentException $exception) { - return $this->echoJson($response, ['ret' => 0, 'msg' => $exception->getMessage()]); - } $whitelist = RegistrationEmailWhitelist::configuredRules(); if ($whitelist['enabled'] && !RegistrationEmailWhitelist::allows($email, $whitelist['domains'])) { return $this->echoJson($response, ['ret' => 0, 'msg' => '此邮箱暂不允许注册']); @@ -908,7 +898,7 @@ class AuthController extends BaseController $connection = (new User())->getConnection(); try { - $connection->transaction(function () use ($read, $email, $name, $password, $code, $profile) { + $connection->transaction(function () use ($read, $email, $name, $password, $code) { if (User::where('email', $email)->exists()) { throw new \InvalidArgumentException('该邮箱已被注册'); } @@ -968,9 +958,6 @@ class AuthController extends BaseController $user = new User(); $user->user_name = (new AntiXSS())->xss_clean($name); $user->email = $email; - foreach ($profile as $field => $value) { - $user->{$field} = $value; - } $user->pass = Hash::passwordHash($password); $user->enable = 1; $user->is_admin = 0; diff --git a/web/public/cloud/account.css b/web/public/cloud/account.css index 33bb9b8f..c7a07160 100644 --- a/web/public/cloud/account.css +++ b/web/public/cloud/account.css @@ -1147,17 +1147,6 @@ body.venix-auth .auth-subtitle { line-height: 1.7; } body.venix-auth .auth-form { display: flex; flex-direction: column; gap: 18px; } -body.venix-auth .auth-profile-section { - display: grid; - gap: 16px; - padding: 18px; - background: var(--vu-panel-soft); - border: 1px solid var(--vu-border); - border-radius: 12px; -} -body.venix-auth .auth-profile-heading { display: grid; gap: 4px; } -body.venix-auth .auth-profile-heading strong { color: var(--vu-text); font-size: 15px; } -body.venix-auth .auth-profile-heading span { color: var(--vu-muted); font-size: 12px; line-height: 1.55; } body.venix-auth .auth-field { min-width: 0; display: flex; @@ -1379,7 +1368,6 @@ body.venix-auth .auth-modal-actions { body.venix-auth .auth-site-nav nav a { padding: 7px 8px; font-size: 12px; } body.venix-auth .auth-shell { align-items: start; padding: 28px 14px; } body.venix-auth .auth-panel { padding: 26px 20px; border-radius: 15px; } - body.venix-auth .auth-profile-section { padding: 16px; } body.venix-auth .auth-panel-wide { width: 100%; margin-left: 0; diff --git a/web/public/cloud/app.js b/web/public/cloud/app.js index 65c04d23..729e228e 100644 --- a/web/public/cloud/app.js +++ b/web/public/cloud/app.js @@ -1,4 +1,4 @@ -import { initializeTaskCenter } from './task-center.js?v=2026102405'; +import { initializeTaskCenter } from './task-center.js?v=2026102406'; const pageModules = Object.freeze({ instances: '/cloud/instances.js', diff --git a/web/resources/views/venix/auth/register.tpl b/web/resources/views/venix/auth/register.tpl index 4a7288df..f5d3fb3b 100644 --- a/web/resources/views/venix/auth/register.tpl +++ b/web/resources/views/venix/auth/register.tpl @@ -30,56 +30,6 @@ {/if} -