1
1
Fork 0

Fixed copy&paste error

This commit is contained in:
Michael 2020-11-18 05:55:15 +00:00
parent b09ffa0697
commit 4f7d42a0d3

View file

@ -1055,15 +1055,15 @@ class DBStructure
} }
if (self::existsTable('user') && !DBA::exists('user', ['uid' => 0])) { if (self::existsTable('user') && !DBA::exists('user', ['uid' => 0])) {
DBA::insert('user', ['uid' => 0]);
$lastid = DBA::lastInsertId();
if ($lastid != 0) {
$user = [ $user = [
"verified" => true, "verified" => true,
"page-flags" => User::PAGE_FLAGS_SOAPBOX, "page-flags" => User::PAGE_FLAGS_SOAPBOX,
"account-type" => User::ACCOUNT_TYPE_RELAY, "account-type" => User::ACCOUNT_TYPE_RELAY,
]; ];
DBA::update('user', $user, ['uid' => $lastid]); DBA::insert('user', $user);
$lastid = DBA::lastInsertId();
if ($lastid != 0) {
DBA::update('user', ['uid' => 0], ['uid' => $lastid]);
} }
} }