Added update function to add user-contact entry
This commit is contained in:
parent
f33a98578d
commit
5113987031
|
@ -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 New Issue
Block a user