Skip to content

Commit e342482

Browse files
committed
Replace UserRuntimeCache with UserProfileRuntimeCache in user ignore actions.
1 parent c082748 commit e342482

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use wcf\command\user\UnignoreUser;
77
use wcf\data\AbstractDatabaseObjectAction;
88
use wcf\system\cache\runtime\UserProfileRuntimeCache;
9-
use wcf\system\cache\runtime\UserRuntimeCache;
109
use wcf\system\exception\IllegalLinkException;
1110
use wcf\system\exception\PermissionDeniedException;
1211
use wcf\system\exception\UserInputException;
@@ -79,9 +78,9 @@ public function validateIgnore()
7978
public function ignore()
8079
{
8180
$type = $this->parameters['data']['type'] ?? UserIgnore::TYPE_BLOCK_DIRECT_CONTACT;
82-
$user = UserRuntimeCache::getInstance()->getObject($this->parameters['data']['userID']);
81+
$userProfile = UserProfileRuntimeCache::getInstance()->getObject($this->parameters['data']['userID']);
8382

84-
(new IgnoreUser(WCF::getUser(), $user, $type))();
83+
(new IgnoreUser(WCF::getUser(), $userProfile->getDecoratedObject(), $type))();
8584

8685
return ['isIgnoredUser' => 1];
8786
}
@@ -112,9 +111,9 @@ public function validateUnignore()
112111
*/
113112
public function unignore()
114113
{
115-
$user = UserRuntimeCache::getInstance()->getObject($this->parameters['data']['userID']);
114+
$userProfile = UserProfileRuntimeCache::getInstance()->getObject($this->parameters['data']['userID']);
116115

117-
(new UnignoreUser(WCF::getUser(), $user))();
116+
(new UnignoreUser(WCF::getUser(), $userProfile->getDecoratedObject()))();
118117

119118
return ['isIgnoredUser' => 0];
120119
}

0 commit comments

Comments
 (0)