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 ]); }