$avatar = $contact['photo'];
unset($contact['photo']);
DBA::update('contact', $contact, ['id' => $contact['id']]);
- Contact::updateAvatar($avatar, 0, $contact['id']);
+ Contact::updateAvatar($contact['id'], $avatar);
$contact['photo'] = $avatar;
}
}
if (!empty($contact->image->url)) {
- Contact::updateAvatar($contact->image->url, $uid, $contact_id);
+ Contact::updateAvatar($contact_id, $contact->image->url);
}
return $contact_id;
if (!empty($cid)) {
DBA::update('contact', $fields, ['id' => $cid]);
- Contact::updateAvatar($avatar, 0, $cid);
+ Contact::updateAvatar($cid, $avatar);
}
$contact = DBA::selectFirst('contact', [], ['uid' => $uid, 'alias' => "twitter::" . $data->id_str]);
Group::addMember(User::getDefaultGroup($uid), $contact_id);
- Contact::updateAvatar($avatar, $uid, $contact_id);
+ Contact::updateAvatar($contact_id, $avatar);
} else {
if ($contact["readonly"] || $contact["blocked"]) {
Logger::log("twitter_fetch_contact: Contact '" . $contact["nick"] . "' is blocked or readonly.", Logger::DEBUG);
$update = true;
}
- Contact::updateAvatar($avatar, $uid, $contact['id']);
+ Contact::updateAvatar($contact['id'], $avatar);
if ($contact['name'] != $data->name) {
$fields['name-date'] = $fields['uri-date'] = DateTimeFormat::utcNow();