diff --git a/wcfsetup/install/files/lib/system/user/command/SetAvatar.class.php b/wcfsetup/install/files/lib/system/user/command/SetAvatar.class.php index 823d4234db..7558372d54 100644 --- a/wcfsetup/install/files/lib/system/user/command/SetAvatar.class.php +++ b/wcfsetup/install/files/lib/system/user/command/SetAvatar.class.php @@ -6,6 +6,7 @@ use wcf\data\file\FileAction; use wcf\data\user\User; use wcf\data\user\UserEditor; +use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\user\group\assignment\UserGroupAssignmentHandler; use wcf\system\user\storage\UserStorageHandler; use wcf\system\user\UserProfileHandler; @@ -39,6 +40,7 @@ public function __invoke() ]); UserStorageHandler::getInstance()->reset([$this->user->userID], 'avatar'); + UserProfileRuntimeCache::getInstance()->removeObject($this->user->userID); // check if the user will be automatically added to new user groups // because of the changed avatar