From 8e2e5378d51069edd50fda97b06105115706a887 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Sun, 31 May 2020 20:09:28 +0200 Subject: [PATCH] Fix marking special trophies as special, if the user which awards the trophy has the trophy awarded --- .../files/lib/data/user/trophy/UserTrophyAction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/user/trophy/UserTrophyAction.class.php b/wcfsetup/install/files/lib/data/user/trophy/UserTrophyAction.class.php index dea4a5502b..d3adf4cb77 100644 --- a/wcfsetup/install/files/lib/data/user/trophy/UserTrophyAction.class.php +++ b/wcfsetup/install/files/lib/data/user/trophy/UserTrophyAction.class.php @@ -60,7 +60,7 @@ class UserTrophyAction extends AbstractDatabaseObjectAction { // checks if the user still has space to add special trophies if (count($userTrophy->getUserProfile()->getSpecialTrophies()) < $userTrophy->getUserProfile()->getPermission('user.profile.trophy.maxUserSpecialTrophies')) { $hasTrophy = false; - foreach (UserTrophyList::getUserTrophies([WCF::getUser()->userID])[WCF::getUser()->userID] as $trophy) { + foreach (UserTrophyList::getUserTrophies([$userTrophy->getUserProfile()->userID])[$userTrophy->getUserProfile()->userID] as $trophy) { if ($trophy->trophyID == $userTrophy->trophyID && $trophy->userTrophyID !== $userTrophy->userTrophyID) { $hasTrophy = true; break; -- 2.20.1