$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
$url = Contact::magicLinkByContact($author, $url);
- return MPhoto::createPhotoForExternalResource($url, local_user());
+ return MPhoto::createPhotoForExternalResource($url, (int)local_user());
case "media":
$media = DBA::selectFirst('post-media', ['url', 'uri-id'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
if (empty($media)) {
$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
$url = Contact::magicLinkByContact($author, $media['url']);
- return MPhoto::createPhotoForExternalResource($url, local_user());
+ return MPhoto::createPhotoForExternalResource($url, (int)local_user());
case "contact":
$contact = Contact::getById($uid, ['uid', 'url', 'avatar', 'photo', 'xmpp', 'addr']);
if (empty($contact)) {
} else {
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_SMALL);
}
- return MPhoto::createPhotoForExternalResource($url, local_user());
+ return MPhoto::createPhotoForExternalResource($url, 0);
case "header":
$contact = Contact::getById($uid, ['uid', 'url', 'header']);
if (empty($contact)) {
} else {
$url = DI::baseUrl() . '/images/blank.png';
}
- return MPhoto::createPhotoForExternalResource($url, local_user());
+ return MPhoto::createPhotoForExternalResource($url, 0);
case "profile":
case "custom":
$scale = 4;
$parts = parse_url($default);
if (!empty($parts['scheme']) || !empty($parts['host'])) {
- $photo = MPhoto::createPhotoForExternalResource($default, local_user());
+ $photo = MPhoto::createPhotoForExternalResource($default, 0);
} else {
$photo = MPhoto::createPhotoForSystemResource($default);
}