mirror of
https://github.com/friendica/friendica
synced 2025-04-23 01:10:11 +00:00
Ensure to never delete the "0" user
This commit is contained in:
parent
81a03b137b
commit
d7fa58d81c
2 changed files with 12 additions and 2 deletions
|
@ -1058,7 +1058,12 @@ class DBStructure
|
|||
DBA::insert('user', ['uid' => 0]);
|
||||
$lastid = DBA::lastInsertId();
|
||||
if ($lastid != 0) {
|
||||
DBA::update('user', ['uid' => 0], ['uid' => $lastid]);
|
||||
$user = [
|
||||
"verified" => true,
|
||||
"page-flags" => User::PAGE_FLAGS_SOAPBOX,
|
||||
"account-type" => User::ACCOUNT_TYPE_RELAY,
|
||||
];
|
||||
DBA::update('user', $user, ['uid' => $lastid]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue