First support for user headers

This commit is contained in:
Michael 2022-01-08 22:43:11 +00:00
parent 2d326c8a27
commit 59358077c7
8 changed files with 196 additions and 51 deletions

View file

@ -323,6 +323,12 @@ class Photo extends BaseModule
$url = DI::baseUrl() . '/images/blank.png';
}
return MPhoto::createPhotoForExternalResource($url);
case "banner":
$photo = MPhoto::selectFirst([], ["scale" => 3, 'uid' => $id, 'photo-type' => MPhoto::USER_BANNER]);
if (!empty($photo)) {
return $photo;
}
return MPhoto::createPhotoForExternalResource(DI::baseUrl() . '/images/friendica-banner.jpg');
case "profile":
case "custom":
$scale = 4;