From 4f7d42a0d39279f59e247db6d21d579b14e7bd93 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 18 Nov 2020 05:55:15 +0000 Subject: [PATCH] Fixed copy&paste error --- src/Database/DBStructure.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 37f55683a1..b1b30171f6 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -1055,15 +1055,15 @@ class DBStructure } if (self::existsTable('user') && !DBA::exists('user', ['uid' => 0])) { - DBA::insert('user', ['uid' => 0]); + $user = [ + "verified" => true, + "page-flags" => User::PAGE_FLAGS_SOAPBOX, + "account-type" => User::ACCOUNT_TYPE_RELAY, + ]; + DBA::insert('user', $user); $lastid = DBA::lastInsertId(); if ($lastid != 0) { - $user = [ - "verified" => true, - "page-flags" => User::PAGE_FLAGS_SOAPBOX, - "account-type" => User::ACCOUNT_TYPE_RELAY, - ]; - DBA::update('user', $user, ['uid' => $lastid]); + DBA::update('user', ['uid' => 0], ['uid' => $lastid]); } }