{/if}
{if $__wcf->user->userID && $user->userID != $__wcf->user->userID}
- {if !$__wcf->getUserProfileHandler()->isIgnoredByUser($user->userID, 1)}
+ {if !$__wcf->getUserProfileHandler()->isIgnoredByUser($user->userID)}
{if $__wcf->getUserProfileHandler()->isFollowing($user->userID)}
<li class="jsOnly"><a href="#" data-following="1" data-object-id="{@$user->userID}" class="jsFollowButton jsTooltip" title="{lang}wcf.user.button.unfollow{/lang}"><span class="icon icon16 fa-minus"></span> <span class="invisible">{lang}wcf.user.button.unfollow{/lang}</span></a></li>
{else}
/**
* Returns a list of user ids that are ignoring this user.
*
- * @param ?int $type One of the UserIgnore::TYPE_* constants.
* @return int[]
*/
- public function getIgnoredByUsers(?int $type = null)
+ public function getIgnoredByUsers()
{
if ($this->ignoredByUserIDs === null) {
$this->ignoredByUserIDs = [];
}
}
- return \array_keys(\array_filter($this->ignoredByUserIDs, static function ($userType) use ($type) {
- if ($type === null) {
- return true;
- } elseif ($type === UserIgnore::TYPE_BLOCK_DIRECT_CONTACT) {
- return \in_array($userType, [UserIgnore::TYPE_BLOCK_DIRECT_CONTACT, UserIgnore::TYPE_HIDE_MESSAGES]);
- } elseif ($type === UserIgnore::TYPE_HIDE_MESSAGES) {
- return $userType === UserIgnore::TYPE_HIDE_MESSAGES;
- } else {
- return false;
- }
- }));
+ return \array_keys($this->ignoredByUserIDs);
}
/**
* Returns true if the given user ignores the current user.
*
* @param int $userID
- * @param ?int $type One of the UserIgnore::TYPE_* constants.
* @return bool
*/
- public function isIgnoredByUser($userID, ?int $type = null)
+ public function isIgnoredByUser($userID)
{
- return \in_array($userID, $this->getIgnoredByUsers($type));
+ return \in_array($userID, $this->getIgnoredByUsers());
}
/**