From 932970b01f2b709a0322358bfd533609500480f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8=E6=A0=88=E5=B0=8F=E5=AD=A6=E7=94=9F?= <1518079521@qq.com> Date: Thu, 7 Sep 2023 09:14:04 +0800 Subject: [PATCH] Update Index.php --- niucloud/app/install/controller/Index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/niucloud/app/install/controller/Index.php b/niucloud/app/install/controller/Index.php index d35b579d4..ee5a016bf 100644 --- a/niucloud/app/install/controller/Index.php +++ b/niucloud/app/install/controller/Index.php @@ -287,10 +287,11 @@ class Index extends BaseInstall $user = ( new SysUser() )->where([ [ 'uid', '=', 1 ] ])->findOrEmpty(); - if (!$user->isEmpty()) { + if ($user->isEmpty()) { $user->save([ 'username' => $username, 'password' => create_password($password), + 'is_admin'=>1 ]); }