From: Michael Date: Sun, 4 Dec 2022 16:33:29 +0000 (+0000) Subject: Issue 12275: Banner upload via avatar does work now X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5c74113bf66429909757cbb41901c51b6f6b5735;p=friendica.git Issue 12275: Banner upload via avatar does work now --- diff --git a/src/Model/Photo.php b/src/Model/Photo.php index f9940f51e3..16acab69aa 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -1325,7 +1325,7 @@ class Photo logger::warning('profile banner upload with scale 3 (960) failed'); } - logger::info('new profile banner upload ended'); + logger::info('new profile banner upload ended', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename]); $condition = ["`photo-type` = ? AND `resource-id` != ? AND `uid` = ?", self::USER_BANNER, $resource_id, $uid]; self::update(['photo-type' => self::DEFAULT], $condition); diff --git a/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php b/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php index 6427a904a8..ac6337ebf0 100644 --- a/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php +++ b/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php @@ -89,11 +89,11 @@ class UpdateCredentials extends BaseApi Logger::info('Update profile and user', ['uid' => $uid, 'user' => $user, 'profile' => $profile]); if (!empty($request['avatar'])) { - Photo::uploadAvatar(1, $request['avatar']); + Photo::uploadAvatar($uid, $request['avatar']); } if (!empty($request['header'])) { - Photo::uploadBanner(1, $request['header']); + Photo::uploadBanner($uid, $request['header']); } User::update($user, $uid);