]> git.mxchange.org Git - friendica.git/commitdiff
Added update function to add user-contact entry
authorMichael <heluecht@pirati.ca>
Sat, 11 Sep 2021 07:59:46 +0000 (07:59 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 11 Sep 2021 07:59:46 +0000 (07:59 +0000)
src/Model/Contact/User.php
update.php

index 184b10991fe5f60f9bcb2b38657c3b092cee2304..a23cd3a55ad5eae8d788868a37a52af4f83d1043 100644 (file)
@@ -56,7 +56,7 @@ class User
 
                $pcontact = Contact::selectFirst(['id'], ['uri-id' => $contact['uri-id'], 'uid' => 0]);
                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;
                }
 
index 536610a00e42304e5a9fbf1dc1725005ef79f842..49287cd0b2a86205a9c944d4f36047fb4b0692bc 100644 (file)
@@ -998,3 +998,11 @@ function update_1434()
 
        return Update::SUCCESS;
 }
+
+function update_1435()
+{
+       $contacts = DBA::select('contact', [], ["`uid` != ?", 0]);
+       while ($contact = DBA::fetch($contacts)) {
+               Contact\User::insertForContactArray($contact);
+       }
+}
\ No newline at end of file