diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-31 14:24:25 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-09-09 14:23:41 +0200 |
commit | bc9a48804688e06a842169be0ed3efbf2fead559 (patch) | |
tree | 81241be20f6da44e83dae52221ddb7ae914fed0e /core | |
parent | f3ec1d3a9f6806aee32b27942e56931f79d9d02c (diff) | |
download | nextcloud-server-bc9a48804688e06a842169be0ed3efbf2fead559.tar.gz nextcloud-server-bc9a48804688e06a842169be0ed3efbf2fead559.zip |
Update avatars on update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core')
-rw-r--r-- | core/Controller/AvatarController.php | 2 | ||||
-rw-r--r-- | core/Controller/GuestAvatarController.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index 804000bf2a7..673ed1be05b 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -131,7 +131,7 @@ class AvatarController extends Controller { * * @return JSONResponse|FileDisplayResponse */ - public function getAvatar(string $userId, int $size, bool $darkTheme = false) { + public function getAvatar(string $userId, int $size) { if ($size <= 64) { if ($size !== 64) { $this->logger->debug('Avatar requested in deprecated size ' . $size); diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php index 09146ff3928..dc4f81bd643 100644 --- a/core/Controller/GuestAvatarController.php +++ b/core/Controller/GuestAvatarController.php @@ -60,9 +60,9 @@ class GuestAvatarController extends Controller { * @param string $size The desired avatar size, e.g. 64 for 64x64px * @return FileDisplayResponse|Http\Response */ - public function getAvatar(string $guestName, string $size, ?bool $dark = false) { + public function getAvatar(string $guestName, string $size, ?bool $darkTheme = false) { $size = (int) $size; - $dark = $dark === null ? false : $dark; + $darkTheme = $darkTheme ?? false; if ($size <= 64) { if ($size !== 64) { @@ -78,7 +78,7 @@ class GuestAvatarController extends Controller { try { $avatar = $this->avatarManager->getGuestAvatar($guestName); - $avatarFile = $avatar->getFile($size); + $avatarFile = $avatar->getFile($size, $darkTheme); $resp = new FileDisplayResponse( $avatarFile, |