Merge pull request #11927 from annando/missing-uri-id

Add the uri-id if missing
This commit is contained in:
Hypolite Petovan 2022-09-24 18:33:23 -04:00 committed by GitHub
commit df559a24c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1153,6 +1153,10 @@ class PostUpdate
while ($contact = DBA::fetch($contacts)) {
$id = $contact['id'];
if (is_null($contact['uri-id'])) {
$contact['uri-id'] = ItemURI::getIdByURI($contact['url']);
DBA::update('contact', ['uri-id' => $contact['uri-id']], ['id' => $contact['id']]);
}
Contact::setAccountUser($contact['id'], $contact['uid'], $contact['uri-id'], $contact['url']);
++$rows;
}