Merge pull request #12330 from annando/issue-12275
Issue 12275: Banner upload via avatar does work now
This commit is contained in:
commit
62f982cf7e
2 changed files with 3 additions and 3 deletions
|
@ -1325,7 +1325,7 @@ class Photo
|
||||||
logger::warning('profile banner upload with scale 3 (960) failed');
|
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];
|
$condition = ["`photo-type` = ? AND `resource-id` != ? AND `uid` = ?", self::USER_BANNER, $resource_id, $uid];
|
||||||
self::update(['photo-type' => self::DEFAULT], $condition);
|
self::update(['photo-type' => self::DEFAULT], $condition);
|
||||||
|
|
|
@ -89,11 +89,11 @@ class UpdateCredentials extends BaseApi
|
||||||
Logger::info('Update profile and user', ['uid' => $uid, 'user' => $user, 'profile' => $profile]);
|
Logger::info('Update profile and user', ['uid' => $uid, 'user' => $user, 'profile' => $profile]);
|
||||||
|
|
||||||
if (!empty($request['avatar'])) {
|
if (!empty($request['avatar'])) {
|
||||||
Photo::uploadAvatar(1, $request['avatar']);
|
Photo::uploadAvatar($uid, $request['avatar']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($request['header'])) {
|
if (!empty($request['header'])) {
|
||||||
Photo::uploadBanner(1, $request['header']);
|
Photo::uploadBanner($uid, $request['header']);
|
||||||
}
|
}
|
||||||
|
|
||||||
User::update($user, $uid);
|
User::update($user, $uid);
|
||||||
|
|
Loading…
Reference in a new issue