mirror of
https://github.com/friendica/friendica
synced 2024-11-17 18:23:40 +00:00
Added update function to add user-contact entry
This commit is contained in:
parent
f33a98578d
commit
5113987031
2 changed files with 9 additions and 1 deletions
|
@ -56,7 +56,7 @@ class User
|
||||||
|
|
||||||
$pcontact = Contact::selectFirst(['id'], ['uri-id' => $contact['uri-id'], 'uid' => 0]);
|
$pcontact = Contact::selectFirst(['id'], ['uri-id' => $contact['uri-id'], 'uid' => 0]);
|
||||||
if (!DBA::isResult($pcontact)) {
|
if (!DBA::isResult($pcontact)) {
|
||||||
Logger::info('Public contact for user not found', ['uri-id' => $contact['uri-id'], 'uid' => $contact['uid'], 'cid' => $pcontact['id']]);
|
Logger::info('Public contact for user not found', ['uri-id' => $contact['uri-id'], 'uid' => $contact['uid']]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -998,3 +998,11 @@ function update_1434()
|
||||||
|
|
||||||
return Update::SUCCESS;
|
return Update::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_1435()
|
||||||
|
{
|
||||||
|
$contacts = DBA::select('contact', [], ["`uid` != ?", 0]);
|
||||||
|
while ($contact = DBA::fetch($contacts)) {
|
||||||
|
Contact\User::insertForContactArray($contact);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue