From 4398f05b91b5c74ab1b37a1f41232f17ac6051b1 Mon Sep 17 00:00:00 2001 From: tokumeikoi Date: Wed, 14 Dec 2022 22:12:28 +0800 Subject: [PATCH] update: install random password --- app/Console/Commands/V2boardInstall.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/V2boardInstall.php b/app/Console/Commands/V2boardInstall.php index 688015bc..563a8b44 100644 --- a/app/Console/Commands/V2boardInstall.php +++ b/app/Console/Commands/V2boardInstall.php @@ -89,16 +89,15 @@ class V2boardInstall extends Command while (!$email) { $email = $this->ask('请输入管理员邮箱?'); } - $password = ''; - while (!$password) { - $password = $this->ask('请输入管理员密码?'); - } + $password = Helper::guid(false); if (!$this->registerAdmin($email, $password)) { abort(500, '管理员账号注册失败,请重试'); } $this->info('一切就绪'); - $this->info('访问 http(s)://你的站点/admin 进入管理面板'); + $this->info("管理员邮箱:{$email}"); + $this->info("管理员密码:{$password}"); + $this->info('访问 http(s)://你的站点/admin 进入管理面板,你可以用户中心修改你的密码,请设置安全复杂的密码。'); } catch (\Exception $e) { $this->error($e->getMessage()); }