mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-20 10:18:10 +00:00
Update Index.php
This commit is contained in:
parent
897938d7fb
commit
932970b01f
@ -287,10 +287,11 @@ class Index extends BaseInstall
|
|||||||
|
|
||||||
|
|
||||||
$user = ( new SysUser() )->where([ [ 'uid', '=', 1 ] ])->findOrEmpty();
|
$user = ( new SysUser() )->where([ [ 'uid', '=', 1 ] ])->findOrEmpty();
|
||||||
if (!$user->isEmpty()) {
|
if ($user->isEmpty()) {
|
||||||
$user->save([
|
$user->save([
|
||||||
'username' => $username,
|
'username' => $username,
|
||||||
'password' => create_password($password),
|
'password' => create_password($password),
|
||||||
|
'is_admin'=>1
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user