]> git.mxchange.org Git - friendica.git/commitdiff
Issue 12275: Banner upload via avatar does work now
authorMichael <heluecht@pirati.ca>
Sun, 4 Dec 2022 16:33:29 +0000 (16:33 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 4 Dec 2022 16:33:29 +0000 (16:33 +0000)
src/Model/Photo.php
src/Module/Api/Mastodon/Accounts/UpdateCredentials.php

index f9940f51e36ef60ab6614e973e8f4690b3c7f152..16acab69aacd627c2fd721f173e853ac0d8e9785 100644 (file)
@@ -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);
index 6427a904a88af74dcaf7cb7229111af3bc24a62a..ac6337ebf027f77d201a4887552d4332f44a4ff5 100644 (file)
@@ -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);