Skip to content

Commit

Permalink
Removing the user object from the cache after setting the avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyperghost committed Nov 11, 2024
1 parent af4056e commit 0f6732c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f6732c

Please sign in to comment.